Vulnerabilities in pkg:npm/@remix-run/react
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/@remix-run/react
Vulnerability advisories affecting package pkg:npm/@remix-run/react. 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 |
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"
}
}