Vulnerabilities in pkg:npm/@remix-run/react

PACKAGE
Advisory Identifier: GHSA-3cgp-3xvw-98x8
Advisory Summary

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

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@remix-run/react

2 Known Advisory Record(s)

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

CVE Identifier CVE-2025-59057
GHSA Identifier GHSA-3cgp-3xvw-98x8
Severity HIGH
CVSS v3.1 Base Score 7.6
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product React router
Package Ecosystem npm
Published Date
Last Updated

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

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

react-router fixed: 7.9.0
npm install react-router@7.9.0
@remix-run/react fixed: 2.17.1
npm install @remix-run/react@2.17.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-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

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

CVE-2025-59057 Affected React router Versions

2 component(s)
Fixed Versions:
7.9.02.17.1
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?
CVE-2025-59057 is a security vulnerability in React router involving React Router has XSS Vulnerability under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which React router versions are affected?
Affected versions include releases prior to 7.9.0, 2.17.1 across affected packages: react-router, @remix-run/react.
What version fixes CVE-2025-59057?
Upgrading to 7.9.0, 2.17.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.9.0. Upgrade your dependency to 7.9.0 or later.
Is @remix-run/react affected?
Yes, @remix-run/react is affected in releases prior to 2.17.1. Upgrade your dependency to 2.17.1 or later.
What is the CVSS score of CVE-2025-59057?
CVE-2025-59057 has a CVSS v3.1 base score of 7.6 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N.
What CWE is associated with CVE-2025-59057?
CVE-2025-59057 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (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.).
How can I check npm dependencies for CVE-2025-59057?
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-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"
  }
}