NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2026-21884: React Router SSR XSS in ScrollRestoration

highCVSS 3.1 8.2GHSA-8v8x-cx79-35w7

A XSS vulnerability exists in in React Router's 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.

Published Jan 8, 2026 · Updated Sep 8, 2026

Affected packages

react-router

Ecosystem
npm
Affected
>= 7.0.0, < 7.12.0
Fixed in
7.12.0
Check
npm ls react-router

@remix-run/react

Ecosystem
npm
Affected
< 2.17.3
Fixed in
2.17.3
Check
npm ls @remix-run/react

Advisory details

From the GitHub Advisory Database (CC BY 4.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.

[!NOTE] > This does not impact applications if developers have disabled server-side rendering in Framework Mode, or if they are using Declarative Mode (<BrowserRouter>) or Data Mode (createBrowserRouter/<RouterProvider>).

Credited to zaddy6, arthurgervais, HF-CYGG.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More npm vulnerabilities

All npm entries