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

Source: https://junglewise.ai/threats/cve-2026-21884-remix-run-react-router-xss-in-scrollrestoration-api  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-01-10. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

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

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.

Technologies: [Shopify Remix-Run\](https://junglewise.ai/threats/technologies/remix-run). Vendors: [npm](https://junglewise.ai/threats/vendors/npm), [Remix](https://junglewise.ai/threats/vendors/remix), [Shopify](https://junglewise.ai/threats/vendors/shopify).

## Quick answers

**Is CVE-2026-21884 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-21884 being exploited in the wild.

**How severe is CVE-2026-21884?** High severity, with a CVSS score of 8.2, published 10 January 2026.

**Which products and versions are affected?** @remix-run/react (npm) < 2.17.3, SEMVER:introduced=0,fixed=2.17.3; Remix React >= 7.0.0, < 7.12.0.

**Is there a fix for CVE-2026-21884?** Yes. @remix-run/react (npm): upgrade to 2.17.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-21884 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-21884?** Check whether you run @remix-run/react (npm), Remix React or Shopify Remix-Run\ at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @remix-run/react (npm): upgrade to 2.17.3 or later

  ```sh
  npm install @remix-run/react@2.17.3
  ```


## 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 &lt;2.17.3 and react-router &lt;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

## Identifiers

- CVE-2026-21884
- GHSA-8v8x-cx79-35w7

## 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

- [https://api.github.com/users/zaddy6](https://api.github.com/users/zaddy6)
- [https://github.com/zaddy6](https://github.com/zaddy6)
- [https://api.github.com/users/zaddy6/gists%7B/gist_id%7D](https://api.github.com/users/zaddy6/gists%7B/gist_id%7D)
- [https://api.github.com/users/zaddy6/repos](https://api.github.com/users/zaddy6/repos)
- [https://avatars.githubusercontent.com/u/49834299?v=4](https://avatars.githubusercontent.com/u/49834299?v=4)
- [https://api.github.com/users/zaddy6/events%7B/privacy%7D](https://api.github.com/users/zaddy6/events%7B/privacy%7D)

## Related threats

- [React Router XSS via unsafe SPA navigation redirects](https://junglewise.ai/threats/cve-2026-22029-react-router-xss-via-unsafe-spa-navigation-redirects)
- [Shopify React Router XSS in Meta component script generation](https://junglewise.ai/threats/cve-2025-59057-shopify-react-router-xss-in-meta-component-script-generation)
