CVE-2025-59057CWE-79

React Router has XSS Vulnerability

High · published January 10, 2026

CVSS v3.1
7.6
EPSS
1%
Percentile
42.1
In the wild
Unconfirmed
What it is

⚡ React Router's meta() APIs have a sneaky XSS vulnerability that could let an attacker run arbitrary JavaScript during server-side rendering! 🚨 Think of it like a restaurant misprinting a menu item that includes hidden ingredients — if the kitchen doesn't check the recipe before serving, it could lead to major allergic reactions! In this case, untrusted content sneaks into the script tags and executes JavaScript without a second thought. An attacker could exploit this to run malicious scripts on users' browsers when they render your pages, leading to data theft, session hijacking, or defacement of your site. This is a serious risk, especially if your app handles sensitive data, potentially putting your users in harm's way.

Put simply

Think of it like a restaurant misprinting a menu item that includes hidden ingredients — if the kitchen doesn't check the recipe before serving, it could lead to major allergic reactions! In this case, untrusted content sneaks into the script tags and executes JavaScript without a second thought. This XSS vulnerability affects the meta()/<Meta> APIs in React Router's Framework Mode, allowing untrusted content to generate script:ld+json tags during server-side rendering, creating an opportunity for arbitrary JavaScript execution.

What to do

An attacker could exploit this to run malicious scripts on users' browsers when they render your pages, leading to data theft, session hijacking, or defacement of your site. This is a serious risk, especially if your app handles sensitive data, potentially putting your users in harm's way. Upgrade to @remix-run/react version 2.17.1 or react-router version 7.9.0 immediately to patch this vulnerability. Additionally, review your application to ensure you're not using untrusted input in these APIs. Consider switching to Declarative Mode if possible for added safety. You've got this! With these steps, you'll not only patch the vulnerability but also strengthen your security posture! 🛡️

The record
Technical detail
CVSS v3.1
7.6 · HIGH
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N
CVSS v4.0
Not supplied
EPSS
0.00503 · 42.1th percentile
Weakness
CWE-79 · Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Published
2026-01-10T02:40Z
EPSS history
Timeline
  • 10 JAN 02:40Z
    React Router has XSS Vulnerability
    cvelistv5