CVE-2026-33244
react-router: React Router: Cross-Site Scripting (XSS) via improper HTTP Location header neutralization
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · June 3, 2026
Updated · November 1, 2026
Description
A flaw was found in react-router. When using Framework Mode with pre-rendering enabled, an attacker can exploit improper handling of the HTTP Location header value. This can lead to Cross-Site Scripting (XSS), allowing malicious scripts to be injected into statically generated HTML files if the redirect location originates from an untrusted source.
Statement
This Moderate flaw in react-router affects applications using Framework Mode with pre-rendering enabled, allowing cross-site scripting (XSS). An untrusted HTTP Location header can inject malicious scripts into statically generated HTML. Red Hat products are only vulnerable if deployed with this specific configuration, as Declarative Mode and Data Mode applications are unaffected.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
To mitigate this issue, Red Hat customers should ensure that applications utilizing React Router avoid Framework Mode with pre-rendering enabled, particularly when handling redirect locations from untrusted sources. If this mode is essential, strict validation and sanitization of all input used in redirect URLs are required. Applications configured with Declarative Mode (<BrowserRouter>) or Data Mode (createBrowserRouter/<RouterProvider>) are not susceptible to this flaw.
CVSS / CWE
CVSS 3.1 · 5.4CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
CWE-79 · Improper Neutralization of Input During Web Page Generation