Packages / react-router / Security

HighVulnerabilityGHSA-3cgp-3xvw-98x8CVE-2025-59057Published 8 Jan 2026

React Router has XSS Vulnerability

Affected releases · react-router

  • 7.x7.0.0 – 7.8.2Fixed in 7.9.0

On 7.x, the newest line:

npm install react-router@7.9.0
8.x
  1. Not affected

    8.0.0 – 8.5.0

    8 releases, latest

7.x
  1. Affected

    7.0.0 – 7.8.2

    26 releases

  2. Fixed

    7.9.0 – 7.18.4

    26 releases

228 stable releases of react-router, oldest to newest, one row per major.

Is your project affected?

Paste your package.json, or type the range you declare for react-router. It is read in your browser and sent nowhere.

What happens

A XSS vulnerability exists in in React Router's meta()/<Meta> APIs in Framework Mode 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 (<BrowserRouter>) or Data Mode (createBrowserRouter/<RouterProvider>).