Vulnerabilities in pkg:npm/react-router

PACKAGE
Advisory Identifier: GHSA-x8j4-g9rr-8j87
Advisory Summary

CVE-2026-139998 is a HIGH denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting React Router libraries in the npm ecosystem. The issue involves polynomial-time redos in matchpath and matchroutes trailing-slash handling. Remediation is available by upgrading affected packages to version 7.18.3, 8.3.1.

26 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/react-router

26 Known Advisory Record(s)

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-x8j4-g9rr-8j87 CVE-2026-139998 HIGH React Router: Polynomial-time ReDoS in matchPath and matchRoutes trailing-slash handling
GHSA-8wpx-2pj4-ggvx CVE-2026-139999 MODERATE React Router: Cross-scheme CSRF bypass in Origin validation
GHSA-7m2v-44vx-v55w CVE-2026-139997 MODERATE React Router: Open redirect via tab character in redirect() paths — bypass of the CVE-2026-53669 / CVE-2026-40181 normalization
GHSA-2rq8-3rm6-2w8f CVE-2026-139995 HIGH React Router: Unauthenticated denial of service via unbounded route-manifest path expansion during SSR document rendering
GHSA-qhgm-jj2j-75wj CVE-2026-139996 HIGH React Router: Prototype Pollution via Vendored turbo-stream Deserializer
GHSA-mjj8-rxh9-q8f5 CVE-2026-139994 MODERATE React Router: Cross-site Scripting due to escapeHtml use in meta refresh HTML attributes
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-2026-139998 at a Glance

CVE Identifier CVE-2026-139998
GHSA Identifier GHSA-x8j4-g9rr-8j87
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product React Router
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-139998

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.3
npm install react-router@7.18.3
react-router fixed: 8.3.1
npm install react-router@8.3.1
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-139998, 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.3), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. 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

A vulnerability in React Router’s route matching may cause excessive CPU consumption when processing specially crafted paths, potentially resulting in denial of service. **Affected Modes:** Declarative, Data, Framework, RSC Data (unstable), and RSC Framework (unstable). Impact may occur in the browser or on the server, depending on where route matching runs.

CVE-2026-139998 Affected React Router Versions

2 component(s)
Fixed Versions:
7.18.38.3.1
Product / Package Ecosystem Affected Versions Fixed Version
react-router
npm
≥ 6.0.0
< 7.18.3
7.18.3
react-router
npm
≥ 8.0.0
< 8.3.1
8.3.1

References

Frequently Asked Questions

What is CVE-2026-139998?
CVE-2026-139998 is a security vulnerability in React Router involving Polynomial-time ReDoS in matchPath and matchRoutes trailing-slash handling under CWE-400: Uncontrolled Resource Consumption.
Which React Router versions are affected?
Affected versions include releases prior to 7.18.3, 8.3.1 across affected packages: react-router.
What version fixes CVE-2026-139998?
Upgrading to 7.18.3, 8.3.1 (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.3, 8.3.1. Upgrade your dependency to 7.18.3, 8.3.1 or later.
What CWE is associated with CVE-2026-139998?
CVE-2026-139998 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for CVE-2026-139998?
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-x8j4-g9rr-8j87",
  "modified" : "2026-12-01T18:28:24Z",
  "published" : "2026-12-01T18:28:24Z",
  "aliases" : [ "CVE-2026-139998" ],
  "summary" : "React Router: Polynomial-time ReDoS in matchPath and matchRoutes trailing-slash handling",
  "details" : "A vulnerability in React Router’s route matching may cause excessive CPU consumption when processing specially crafted paths, potentially resulting in denial of service.\n\n**Affected Modes:** Declarative, Data, Framework, RSC Data (unstable), and RSC Framework (unstable).\n\nImpact may occur in the browser or on the server, depending on where route matching runs.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "react-router"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "7.18.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "react-router"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0"
      }, {
        "fixed" : "8.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/remix-run/react-router/security/advisories/GHSA-x8j4-g9rr-8j87"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-139998"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/remix-run/react-router/pull/15417"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/remix-run/react-router/pull/15423"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/remix-run/react-router/commit/308d206e9afe75f8ac20f1028fe93491302bbf8c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/remix-run/react-router/commit/6cc6f7a657e5808a510627ac6d9c0456ddeda9f0"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/remix-run/react-router"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v831"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/remix-run/react-router/blob/v7/CHANGELOG.md#v7183"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/remix-run/react-router/releases/tag/react-router@7.18.3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/remix-run/react-router/releases/tag/react-router@8.3.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333", "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-12-01T18:28:24Z",
    "nvd_published_at" : "2026-11-30T22:17:29Z"
  }
}