CVE-2025-59057
XSS Vulnerability in React Router meta()/Meta APIs During SSR
Publication date: 2026-01-10
Last updated on: 2026-01-10
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| remix-run | react | From 1.15.0 (inc) to 2.17.0 (inc) |
| remix-run | react | From 2.17.1 (inc) |
| react-router | react-router | From 7.0.0 (inc) to 7.8.2 (inc) |
| react-router | react-router | From 7.9.0 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-79 | 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. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2025-59057 is a high-severity Cross-Site Scripting (XSS) vulnerability in React Router's meta() / <Meta> APIs when used in Framework Mode. It occurs during server-side rendering (SSR) when generating script:ld+json tags if untrusted content is used. This can allow attackers to execute arbitrary JavaScript code. The vulnerability affects @remix-run/react versions 1.15.0 through 2.17.0 and react-router versions 7.0.0 through 7.8.2. Applications using Declarative Mode or Data Mode are not affected. The issue has been patched in later versions. [1]
How can this vulnerability impact me? :
This vulnerability can allow an attacker to execute arbitrary JavaScript code during server-side rendering if untrusted content is used to generate JSON-LD script tags. This can lead to confidentiality breaches (high impact), as sensitive data could be exposed, and integrity issues (low impact), potentially compromising the security of the application. However, availability is not impacted. Exploitation requires network access and some user interaction. [1]
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, immediately upgrade the affected packages to the patched versions: update @remix-run/react to version 2.17.1 or later, and react-router to version 7.9.0 or later. Additionally, if possible, avoid using Framework Mode with meta()/ <Meta> APIs to generate script:ld+json tags from untrusted content during server-side rendering. Consider using Declarative Mode (<BrowserRouter>) or Data Mode (createBrowserRouter / <RouterProvider>) as these modes are not affected by this vulnerability. [1]