React Router has stored XSS via unescaped Location header in prerendered redirect HTML
Published 3 Jun 2026 · Updated 8 Sept 2026
Affected package
- Affected
- >=7.5.1 <7.13.2
- Fixed in
- 7.13.2
npm install react-router@7.13.2Details
When using React Router v7 Framework Mode with Pre-rendering enabled, an improper neutralization of the HTTP Location header value can permit Cross-Site Scripting (XSS) in statically generated HTML files if the redirect location comes from an untrusted source.
> [!NOTE]
> This does not impact your React Router application if you are using Declarative Mode (<BrowserRouter>) or Data Mode (createBrowserRouter/<RouterProvider>).
Is GHSA-f22v-gfqf-p8f3 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected react-router, and gives you the command that fixes it.
References
- Linkgithub.com/remix-run/react-router/security/advisories/GHSA-f22v-gfqf-p8f3
- Advisorynvd.nist.gov/vuln/detail/CVE-2026-33244
- Linkgithub.com/remix-run/react-router/pull/14880
- Linkgithub.com/remix-run/react-router/commit/ea28e66926460656815cee9b7f2dfaa872513a8c
- Packagegithub.com/remix-run/react-router
- Linkgithub.com/remix-run/react-router/blob/react-router%407.13.2/CHANGELOG.md#v7132
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.