CVE-2026-21884: React Router SSR XSS in ScrollRestoration
React Router is a router for React. In @remix-run/react version prior to 2.17.3. and react-router 7.0.0 through 7.11.0, a XSS vulnerability exists in in React Router's <ScrollRestoration> API in Framework Mode when using the getKey/storageKey props during Server-Side Rendering which could allow arbitrary JavaScript execution during SSR if untrusted content is used to generate the keys. There is no impact if server-side rendering in Framework Mode is disabled, or if Declarative Mode (<BrowserRouter>) or Data Mode (createBrowserRouter/<RouterProvider>) is being used. This issue has been patched in @remix-run/react version 2.17.3 and react-router version 7.12.0.
Security readout for executives and security teams
Plain-English summary
Some React Router server-rendered applications can accidentally place attacker-controlled data into page scripts through ScrollRestoration keys. If exploited, a victim who visits an affected page could run malicious JavaScript in their browser. The issue is limited to specific Framework Mode SSR use, not all React Router applications.
Executive priority
Prioritize remediation for internet-facing React Router or Remix applications that use server-side rendering. The vulnerability is high severity, but exposure is conditional. Teams should quickly confirm whether the affected rendering mode and ScrollRestoration props are present before treating it as broadly exploitable.
Technical view
CVE-2026-21884 is a CWE-79 XSS in React Router's <ScrollRestoration> API when Framework Mode SSR uses getKey or storageKey values derived from untrusted content. Affected versions are @remix-run/react before 2.17.3 and react-router 7.0.0 through 7.11.0. Patched versions are 2.17.3 and 7.12.0.
Likely exposure
Exposure is likely in React or Remix applications using the affected package versions, Framework Mode with server-side rendering, and ScrollRestoration getKey or storageKey props influenced by untrusted content. Declarative Mode, Data Mode, and Framework Mode without SSR are stated as not impacted.
Exploitation context
The CVSS vector is network-accessible with low attack complexity, no privileges required, and user interaction required. The provided sources do not identify active exploitation, and the CVE is not marked KEV. Treat exploit status as unconfirmed unless later vendor or KEV evidence appears.
Researcher notes
Key triage questions are package version, rendering mode, and whether untrusted content can influence getKey or storageKey. The public bundle gives affected ranges and patched versions but does not provide exploit details. Avoid assuming impact for BrowserRouter, createBrowserRouter, RouterProvider, or Framework Mode without SSR.
Mitigation direction
Upgrade @remix-run/react to 2.17.3 or later.
Upgrade react-router to 7.12.0 or later.
Review ScrollRestoration getKey and storageKey generation for untrusted input.
If upgrade is delayed, avoid affected Framework Mode SSR usage where feasible.
Check React Router and Red Hat guidance for package-specific fixes.
Validation and detection
Inventory @remix-run/react and react-router versions in application manifests and lockfiles.
Confirm whether the application uses Framework Mode with server-side rendering.
Search for ScrollRestoration usage with getKey or storageKey props.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-79: User-session and phishing behavior lookup
Client-side and session-facing weaknesses should be reviewed alongside initial-access and user-execution behaviors. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
5Timeline events
2ADP providers
9Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.