CVE-2026-53666: React Router Arbitrary Constructor Injection Vulnerability
MODERATECVE-2026-53666 is a MODERATE (CVSS 6.1) arbitrary constructor injection vulnerability (CWE-470: Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')) affecting React Router libraries in the npm ecosystem. The issue involves arbitrary constructor injection via deserializeerrors() in react router ssr hydration. Remediation is available by upgrading affected packages to version 7.18.0.
CVE-2026-53666 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2026-53666
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.18.0
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-2026-53666, 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.18.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-470: Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection'), where the product uses external input with reflection to select which classes or code to use, but it does not sufficiently prevent the input from selecting improper classes or code. 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-2026-53666 Affected React Router Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
react-router
|
npm |
≥ 6.4.0
< 7.18.0
|
7.18.0
|
References
Frequently Asked Questions
What is CVE-2026-53666?
Which React Router versions are affected?
What version fixes CVE-2026-53666?
Is react-router affected?
What is the CVSS score of CVE-2026-53666?
What CWE is associated with CVE-2026-53666?
How can I check npm dependencies for CVE-2026-53666?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-337j-9hxr-rhxg",
"modified" : "2026-07-23T19:34:14Z",
"published" : "2026-07-23T19:34:14Z",
"aliases" : [ "CVE-2026-53666" ],
"summary" : "React Router: Arbitrary Constructor Injection via deserializeErrors() in React Router SSR Hydration",
"details" : "If application code allows attacker supplied input to overwrite certain aspects of errors caught by the SSR process, then it was possible for attacker to trigger unexpected constructor execution on the client which would trigger outbound network traffic. This is only possible with very specific (and unlikely) application layer code.\n\n> [!NOTE]\n> This does not impact your application if you are using Declarative Mode. This only impacts Framework Mode and Data Mode applications doing manual SSR/hydration",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "react-router"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.4.0"
}, {
"fixed" : "7.18.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/remix-run/react-router/security/advisories/GHSA-337j-9hxr-rhxg"
}, {
"type" : "WEB",
"url" : "https://github.com/remix-run/react-router/pull/15175"
}, {
"type" : "WEB",
"url" : "https://github.com/remix-run/react-router/commit/9d22943fd46c8ae4b08236425fa3549e10e9ad1a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/remix-run/react-router"
}, {
"type" : "WEB",
"url" : "https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v7180"
}, {
"type" : "WEB",
"url" : "https://github.com/remix-run/react-router/releases/tag/react-router@7.18.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-470" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-23T19:34:14Z",
"nvd_published_at" : null
}
}