CVE-2025-59057
React Router has XSS Vulnerability
Summary
A XSS vulnerability exists in in React Router's `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) (` `) or [Data Mode](https://reactrouter.com/start/modes#data) (`createBrowserRouter`/` `).
Affected packages
| Ecosystem | Package | Affected versions | Fixed versions |
|---|---|---|---|
| npm | @remix-run/react | — | 2.17.1 |
| npm | react-router | — | 7.9.0 |
Remediation: Upgrade to 2.17.1 or later.
References
Includes data from the GitHub Advisory Database, licensed under CC-BY 4.0.
CVE® is a registered trademark of The MITRE Corporation. CVE content reproduced under the CVE Terms of Use; copyright designation © MITRE.
EPSS scores provided by the FIRST.org Exploit Prediction Scoring System.