CVE-2026-33244

React Router has stored XSS via unescaped Location header in prerendered redirect HTML

Published Jun 2, 2026 CVSS 3.1 · 5.4 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability arises when Remix's React Router, in Framework Mode with pre‑rendering enabled, fails to neutralise the value of the HTTP Location header. If the redirect target originates from an untrusted source, the unescaped value is embedded into the statically generated HTML file, leading to a stored cross‑site scripting flaw. An attacker could deliver malicious JavaScript that executes in the victim's browser whenever the affected static page is loaded. This flaw is classified under CWE‑79.

Affected Systems

Vulnerable versions of remix‑run react‑router – specifically 7.5.1 through 7.13.1 – are impacted. The issue is resolved in 7.13.2 and later releases.

Risk and Exploitability

The CVSS score is 5.4, indicating moderate severity. The EPSS score is not available, and the flaw is not listed in CISA KEV. Exploitation requires that the attacker can influence the Location header of a prerendered redirect, which then becomes reflected in the static HTML served to users. Although the attack would not grant arbitrary code execution on the server, the reflected script would run with the privileges of the page context, potentially allowing data theft or session hijacking. The risk is therefore limited to client‑side impact but remains significant for sites that trust user‑generated redirects.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update remix‑run react‑router to version 7.13.2 or later
  • Ensure that all redirect destinations used in the Location header are trusted or sanitized before being encoded into a prerendered page
  • If possible, disable Framework Mode pre‑rendering for redirect pages or switch to Declarative or Data mode, which do not construct static redirect HTML

Generated by OpenCVE AI on June 2, 2026 at 18:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-f22v-gfqf-p8f3 React Router has stored XSS via unescaped Location header in prerendered redirect HTML
History
Type Values Removed Values Added
First Time appeared Shopify
Shopify react-router
CPEs cpe:2.3:a:shopify:react-router:*:*:*:*:*:node.js:*:*
Vendors & Products Shopify
Shopify react-router
Type Values Removed Values Added
First Time appeared Remix-run
Remix-run react-router
Vendors & Products Remix-run
Remix-run react-router
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title React Router has stored XSS via unescaped Location header in prerendered redirect HTML
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jun 2, 2026, 5:28 PM
Reserved
Mar 18, 2026, 2:42 AM
Status
Analyzed
Published
Jun 2, 2026, 5:16 PM
Modified
Jul 21, 2026, 7:10 PM
Severity
Moderate
Public date
Jun 2, 2026, 4:59 PM