Junglewise Threat Intelligence

CVE-2026-21884: remix-run react-router XSS in ScrollRestoration API

CVE-2026-21884 · Severity: high · CVSS 8.2 · Published 2026-01-10

Technologies: Shopify Remix-Run\. Vendors: Remix, Shopify, npm.

Executive brief

React Router is a popular routing library for React applications. A cross-site scripting (XSS) vulnerability exists in the ScrollRestoration component when using server-side rendering with untrusted input in key generation. An attacker who can influence the getKey or storageKey properties could execute arbitrary JavaScript code during server-side rendering, potentially compromising the application and user data.

Technical details

The vulnerability is a CWE-79 improper neutralization of user-controllable input in web page generation (XSS). The vulnerable component is the ScrollRestoration API in React Router's Framework Mode during server-side rendering (SSR). The attack vector requires user interaction and network access, with no special privileges required. When developers use untrusted input to generate the getKey or storageKey properties in ScrollRestoration, the library fails to properly sanitize this input before including it in the SSR output, allowing JavaScript injection. The vulnerability does not affect applications using Declarative Mode (BrowserRouter) or Data Mode (createBrowserRouter/RouterProvider), or those with SSR disabled. Patches are available: @remix-run/react <2.17.3 and react-router <7.12.0 are vulnerable; update to 2.17.3 and 7.12.0 respectively.

Affected products

  • Remix @remix-run/react < 2.17.3
  • Remix react-router >= 7.0.0, < 7.12.0

Timeline

  • 2026-01-08: disclosed: Vulnerability disclosed and published to GitHub Advisory Database
  • 2026-01-08: patched: Patches released: @remix-run/react 2.17.3 and react-router 7.12.0

References

Related threats