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
This is a high-severity cross-site scripting issue in React Router SSR. A vulnerable app can render attacker-influenced JavaScript through ScrollRestoration keys when specific Framework Mode SSR usage is present. Exposure depends on configuration, not just package presence.
Executive priority
Treat this as a priority patch for internet-facing SSR React applications handling user-controlled content. The risk is configuration-dependent, so teams should rapidly identify affected usage before assuming broad exposure.
Technical view
CVE-2026-21884 affects @remix-run/react before 2.17.3 and react-router 7.0.0 through 7.11.0. The vulnerable path is <ScrollRestoration> in Framework Mode SSR when getKey or storageKey uses untrusted content to generate keys, enabling XSS during SSR.
Likely exposure
Likely exposure is public React Router or Remix applications using Framework Mode with server-side rendering and ScrollRestoration getKey or storageKey values derived from untrusted input. Declarative Mode, Data Mode, and disabled Framework Mode SSR are stated as not impacted.
Exploitation context
The bundle lists KEV as false and provides no cited evidence of active exploitation. The CVSS vector indicates network reachability, low attack complexity, no privileges, and required user interaction, with high confidentiality impact and changed scope.
Researcher notes
Do not flag package version alone as exploitable. The vulnerable condition requires Framework Mode SSR plus ScrollRestoration getKey/storageKey use with untrusted key material. Evidence in the bundle is sufficient for affected-version and fixed-version analysis, but not for active exploitation claims.
Mitigation direction
Upgrade @remix-run/react to 2.17.3 or later.
Upgrade react-router to 7.12.0 or later.
Avoid deriving getKey or storageKey from untrusted content.
Disable Framework Mode SSR where vendor-supported and operationally acceptable.
Check React Router and Red Hat guidance for downstream package-specific fixes.
Validation and detection
Inventory @remix-run/react and react-router versions across applications.
Confirm whether Framework Mode SSR is enabled.
Search usage of <ScrollRestoration> with getKey or storageKey props.
Trace key-generation inputs for user-controlled or external content.
Confirm apps use Declarative Mode or Data Mode before deprioritizing.
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.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-79 · source CWE mapping
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.