CVE-2026-53666: React Router Arbitrary Constructor Injection Vulnerability

MODERATE
Advisory Identifier: GHSA-337j-9hxr-rhxg
CVSS 6.1
CWE-470
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-53666
GHSA Identifier GHSA-337j-9hxr-rhxg
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-470: Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')
Affected Product React Router
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (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.

react-router fixed: 7.18.0
npm install react-router@7.18.0
Verify Direct and Transitive Dependencies

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

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. > [!NOTE] > 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

CVE-2026-53666 Affected React Router Versions

1 component(s)
Fixed Versions:
7.18.0
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?
CVE-2026-53666 is a security vulnerability in React Router involving Arbitrary Constructor Injection via deserializeErrors() in React Router SSR Hydration under CWE-470: Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection').
Which React Router versions are affected?
Affected versions include releases prior to 7.18.0 across affected packages: react-router.
What version fixes CVE-2026-53666?
Upgrading to 7.18.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is react-router affected?
Yes, react-router is affected in releases prior to 7.18.0. Upgrade your dependency to 7.18.0 or later.
What is the CVSS score of CVE-2026-53666?
CVE-2026-53666 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2026-53666?
CVE-2026-53666 is classified under CWE-470: Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') (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.).
How can I check npm dependencies for CVE-2026-53666?
Run the dependency tree command: 'npm ls react-router'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}