GitHub Advisoryadvisory · npm
GHSA-qx66-fv34-fjm8 TanStack Router: Unauthenticated reflected XSS in TanStack Start server-function responses
CRITICAL
Official page ↗
- Aliases
- CVE-2026-102989
- Ecosystem
- npm
- Packages
- @tanstack/start-server-core, @tanstack/react-start, @tanstack/solid-start, @tanstack/vue-start
- Severity
- Critical
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
- Weaknesses
- CWE-79
- Reviewed
- 2026-10-15
Affected packages
• npm @tanstack/start-server-core: >= 1.143.12, < 1.169.39 → fixed in 1.169.39
• npm @tanstack/react-start: >= 1.143.12, < 1.168.60 → fixed in 1.168.60
• npm @tanstack/solid-start: >= 1.143.12, < 1.168.57 → fixed in 1.168.57
• npm @tanstack/vue-start: >= 1.143.12, < 1.168.56 → fixed in 1.168.56
Description
Impact
An unauthenticated attacker can craft a URL to a server function in an affected TanStack Start app. If someone opens the link, the app can return attacker-controlled HTML from its own origin and run the attacker's JavaScript there. The script can access same-origin data available to that visitor and make requests with their authority.
Cause
The server-function transport can pass request payload fields into internal middleware state instead of limiting them to public input fields. A malformed payload can leave an attacker-controlled result in the error path. Response handling can then treat a response-shaped object as an HTTP response.
Affected versions
Published versions of `@tanstack/start-server-core`, `@tanstack/react-start`, `@tanstack/solid-start`, and `@tanstack/vue-start` from `1.143.12` up to, but not including, their respective patched versions are affected. The patched versions are `@tanstack/[email protected]`, `@tanstack/[email protected]`, `@tanstack/[email protected]`, and `@tanstack/[email protected]`.
Fix
The fix limits client-supplied server-function input to public fields and validates responses at the server boundary. Upgrade to the corresponding patched package version.
Temporary mitigations
For the configured server-function path, usually `/_serverFn/*`, an edge or WAF rule can consider blocking requests without the literal `x-tsr-serverFn: true` header and browser document navigations such as `Sec-Fetch-Mode: navigate` or `Accept: text/html`. A restrictive Content Security Policy on server-function responses can provide another browser-side restriction. These are mitigation suggestions, not a complete fix. The header is client-controlled and is not authentication. Test rules against legitimate GET and POST server functions and use a matching version-specific backport where possible.
Credits
Lovable helped us discover and report this issue. We thank them for their help.
Related
Alias · CVE (1)
- CVE-2026-102989 TanStack Router is a client-first, server-capable, fully type-safe router and full-stack framework for the web. vulnerability
Weakness · CWE (1)
- CWE-79 Improper Neutralization of Input During Web Page Generation weakness
References
- https://github.com/TanStack/router/security/advisories/GHSA-qx66-fv34-fjm8 web
- https://nvd.nist.gov/vuln/detail/CVE-2026-102989 advisory
- https://github.com/TanStack/router/pull/8573 web
- https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb web
- https://github.com/TanStack/router package
- https://github.com/TanStack/router/releases/tag/release-2026-09-30-1747 web