Reflected XSS in TanStack Start Server-Functions
A critical reflected XSS vulnerability (CVE-2026-102989) in TanStack Start server-functions allows unauthenticated attackers to execute arbitrary JavaScript in the context of the application origin.
CVE search metadata
CVE search record: CVE-2026-102989. Severity: critical. CVSS: 9.3. EPSS: 0.52%. KEV: no. Product: start-server-core (1.143.12 - <1.169.39), react-start (1.143.12 - <1.168.60), solid-start (1.143.12 - <1.168.57), vue-start (1.143.12 - <1.168.56). Brief: Reflected XSS in TanStack Start Server-Functions. Brief link: https://feed.craftedsignal.io/briefs/2026-10-tanstack-xss/
CVE-2026-102989 is a critical reflected cross-site scripting (XSS) vulnerability affecting TanStack Start framework applications. The issue stems from the server-function transport layer, which improperly allows request payload fields to influence internal middleware state rather than restricting input to defined public fields. An attacker can craft a malformed payload that forces an attacker-controlled result into the error path, which is then incorrectly processed by the response handler as an HTTP response. This allows the attacker to inject arbitrary HTML and execute JavaScript within the application's origin when a victim navigates to a crafted URL. Successful exploitation enables unauthorized access to same-origin data and the ability to perform requests on behalf of the victim.
Attack Chain
- Attacker identifies a target application utilizing vulnerable versions of TanStack Start.
- Attacker crafts a malicious URL targeting a server-function endpoint, typically under the
/_serverFn/*path. - Attacker injects a malicious payload into the request fields that influences internal middleware state.
- The application receives the request and fails to validate the payload against expected public input fields.
- The server-function error path processes the malformed payload, leading to the creation of a response-shaped object containing attacker-supplied content.
- The server transmits the malicious response back to the client.
- The victim's browser interprets the malicious response, executing the injected JavaScript in the context of the application's origin.
Impact
The vulnerability allows unauthenticated attackers to perform reflected XSS attacks against any user who navigates to a crafted link. This provides the attacker the ability to steal sensitive user data, perform actions as the authenticated user, and bypass same-origin protections. All applications using affected versions of @tanstack/start-server-core, @tanstack/react-start, @tanstack/solid-start, and @tanstack/vue-start (version 1.143.12 and above) are exposed until patched.
Recommendation
- Upgrade all affected packages immediately to the following patched versions:
@tanstack/start-server-core@1.169.39,@tanstack/react-start@1.168.60,@tanstack/solid-start@1.168.57, and@tanstack/vue-start@1.168.56. - Implement a restrictive Content Security Policy (CSP) to limit the execution of unauthorized scripts if patching is delayed.
- Deploy WAF rules to block requests to
/_serverFn/*that lack the mandatoryx-tsr-serverFn: trueheader. - Configure WAF rules to block requests directed at server-function endpoints that contain headers associated with browser navigations, such as
Sec-Fetch-Mode: navigateorAccept: text/html.
Immediate actions
Upgrade TanStack Start packages to the identified fixed versions.
Mitigations
Configure WAF to block server-function requests lacking 'x-tsr-serverFn: true' header.
CVE-2026-102989