Vulnerabilities in pkg:npm/react-router
PACKAGECVE-2025-59057 is a HIGH (CVSS 7.6) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting React router libraries in the npm ecosystem. The issue involves react router has xss vulnerability. Remediation is available by upgrading affected packages to version 7.9.0, 2.17.1.
pkg:npm/react-router
Vulnerability advisories affecting package pkg:npm/react-router. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-3cgp-3xvw-98x8 | CVE-2025-59057 | HIGH | React Router has XSS Vulnerability |
| GHSA-8v8x-cx79-35w7 | CVE-2026-21884 | HIGH | React Router SSR XSS in ScrollRestoration |
| GHSA-f22v-gfqf-p8f3 | CVE-2026-33244 | MODERATE | React Router has stored XSS via unescaped Location header in prerendered redirect HTML |
| GHSA-jjmj-jmhj-qwj2 | CVE-2026-53668 | MODERATE | React Router: Open redirect leading to XSS |
| GHSA-qwww-vcr4-c8h2 | - | HIGH | React Router: RSC Mode CSRF Bypass Allows Action Execution Before 400 Response |
| GHSA-2j2x-hqr9-3h42 | CVE-2026-40181 | MODERATE | React Router's same-origin redirect with path starting // causes open redirect via protocol-relative URL reinterpretation |
| GHSA-chx6-hx7r-mcp5 | CVE-2026-55685 | HIGH | React Router: Unauthenticated Denial of Service via Inefficient Route Matching |
| GHSA-wrjc-x8rr-h8h6 | CVE-2026-53669 | MODERATE | React Router: Open redirect via backslash in <Link> and useNavigate (CVE-2025-68470 bypass) |
| GHSA-h8fp-f39c-q6mh | CVE-2026-53667 | MODERATE | React Router: RSCErrorHandler Missing Protocol Validation (XSS) |
| GHSA-337j-9hxr-rhxg | CVE-2026-53666 | MODERATE | React Router: Arbitrary Constructor Injection via deserializeErrors() in React Router SSR Hydration |
| GHSA-84g9-w2xq-vcv6 | CVE-2026-53663 | LOW | React Router: Potential CSRF via PUT/PATCH/DELETE document requests |
| GHSA-h5cw-625j-3rxh | CVE-2026-22030 | MODERATE | React Router has CSRF issue in Action/Server Action Request Processing |
| GHSA-rxv8-25v2-qmq8 | CVE-2026-34077 | HIGH | React Router vulnerable to Denial of Service via reflected user input in single-fetch |
| GHSA-8x6r-g9mw-2r78 | CVE-2026-42342 | HIGH | React Router vulnerable to DoS via unbounded path expansion in __manifest endpoint |
| GHSA-49rj-9fvp-4h2h | CVE-2026-42211 | HIGH | React Router's vendored turbo-stream v2 allows arbitrary constructor invocation via TYPE_ERROR deserialization leading to Unauth RCE |
| GHSA-8646-j5j9-6r62 | CVE-2026-33245 | HIGH | React Router vulnerable to XSS in unstable RSC redirect handling via javascript: redirect targets |
| GHSA-cpj6-fhp6-mr6j | CVE-2025-43865 | HIGH | React Router allows pre-render data spoofing on React-Router framework mode |
| GHSA-2w69-qvjg-hvjx | CVE-2026-22029 | HIGH | React Router vulnerable to XSS via Open Redirects |
| GHSA-9jcx-v3wj-wh4m | CVE-2025-68470 | MODERATE | React Router has unexpected external redirect via untrusted paths |
| GHSA-f46r-rw29-r322 | CVE-2025-43864 | HIGH | React Router allows a DoS via cache poisoning by forcing SPA mode |
CVE-2025-59057 at a Glance
Security Impact
CVSS: 7.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N).
How to Fix CVE-2025-59057
To remediate this vulnerability, upgrade all affected React router dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install react-router@7.9.0
npm install @remix-run/react@2.17.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls react-router
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-59057, inspect your project dependencies using npm:
npm ls react-router
Analyze the terminal output to locate any version of React router in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.9.0), your application is affected.
Note: The npm ls react-router command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In React router, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-59057 Affected React router Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
react-router
|
npm |
≥ 7.0.0
< 7.9.0
|
7.9.0
|
|
@remix-run/react
|
npm |
≥ 1.15.0
< 2.17.1
|
2.17.1
|
References
Frequently Asked Questions
What is CVE-2025-59057?
Which React router versions are affected?
What version fixes CVE-2025-59057?
Is react-router affected?
Is @remix-run/react affected?
What is the CVSS score of CVE-2025-59057?
What CWE is associated with CVE-2025-59057?
How can I check npm dependencies for CVE-2025-59057?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3cgp-3xvw-98x8",
"modified" : "2026-09-08T16:31:34Z",
"published" : "2026-01-08T20:42:20Z",
"aliases" : [ "CVE-2025-59057" ],
"summary" : "React Router has XSS Vulnerability",
"details" : "A XSS vulnerability exists in in React Router's `meta()`/`<Meta>` APIs in [Framework Mode](https://reactrouter.com/start/modes#framework) when generating `script:ld+json` tags which could allow arbitrary JavaScript execution during SSR if untrusted content is used to generate the tag.\n\n> [!NOTE]\n> This does not impact applications using [Declarative Mode](https://reactrouter.com/start/modes#declarative) (`<BrowserRouter>`) or [Data Mode](https://reactrouter.com/start/modes#data) (`createBrowserRouter`/`<RouterProvider>`).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "react-router"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.9.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 7.8.2"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@remix-run/react"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.15.0"
}, {
"fixed" : "2.17.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.17.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/remix-run/react-router/security/advisories/GHSA-3cgp-3xvw-98x8"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-59057"
}, {
"type" : "WEB",
"url" : "https://github.com/remix-run/react-router/pull/14316"
}, {
"type" : "WEB",
"url" : "https://github.com/remix-run/react-router/commit/0e774855797fcb3c7538c269158f4541beb55a1b"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:19712"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:3782"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:3958"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2026:3960"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/security/cve/CVE-2025-59057"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2428426"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/remix-run/react-router"
}, {
"type" : "WEB",
"url" : "https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v790"
}, {
"type" : "WEB",
"url" : "https://github.com/remix-run/react-router/releases/tag/react-router@7.9.0"
}, {
"type" : "WEB",
"url" : "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-59057.json"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-01-08T20:42:20Z",
"nvd_published_at" : "2026-01-10T03:15:48Z"
}
}