CVE-2026-33244: React Router has stored XSS via unescaped Location header in prerendered redirect HTML
React Router is a router for React. In versions 7.5.1 through 7.13.1, when using Framework Mode with pre-rendering enabled, improper neutralization of the HTTP Location header value can permit Cross-Site Scripting (XSS) in the statically generated HTML files if the redirect location comes from an untrusted source. This does not impact applications using Declarative Mode (<BrowserRouter>) or Data Mode (createBrowserRouter/<RouterProvider>). This is patched in version 7.13.2.
Other sources
React Router is a router for React. In versions 7.5.1 through 7.13.1, when using Framework Mode with pre-rendering enabled, improper neutralization of the HTTP Location header value can permit Cross-Site Scripting (XSS) in the statically generated HTML files if the redirect location comes from an untrusted source. This does not impact applications using Declarative Mode (BrowserRouter) or Data Mode (createBrowserRouter/RouterProvider). This is patched in version 7.13.2.
— IBM
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>).
— GitHub
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/react-routerto a version that resolves this vulnerability.Fixed in 7.13.2 - Upgrade
Upgrade
react-routerto a version that resolves this vulnerability.Fixed in 7.13.2
Event History
Frequently Asked Questions
What is the severity of CVE-2026-33244?
The severity of CVE-2026-33244 is medium with a score of 5.4.
How do I fix CVE-2026-33244?
To fix CVE-2026-33244, upgrade React Router to version 7.13.2 or later.
What kind of vulnerability is CVE-2026-33244?
CVE-2026-33244 is a stored Cross-Site Scripting (XSS) vulnerability.
Which versions of React Router are affected by CVE-2026-33244?
Versions 7.5.1 through 7.13.1 of React Router are affected by CVE-2026-33244.
Does CVE-2026-33244 allow for remote exploitation?
Yes, CVE-2026-33244 allows for remote exploitation due to improper handling of the HTTP Location header.