The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-59057

CVE-2025-59057: React Router XSS Vulnerability

CVE-2025-59057 is a cross-site scripting vulnerability in React Router that affects Framework Mode meta() APIs, allowing JavaScript execution during SSR. This article covers technical details, affected versions, and mitigation.

Updated: January 22, 2026

CVE-2025-59057 Overview

A Cross-Site Scripting (XSS) vulnerability exists in React Router's meta()/<Meta> APIs when operating in Framework Mode. The vulnerability occurs during the generation of script:ld+json tags and could allow arbitrary JavaScript execution during Server-Side Rendering (SSR) if untrusted content is used to generate the tag. This affects @remix-run/react versions 1.15.0 through 2.17.0 and react-router versions 7.0.0 through 7.8.2.

Critical Impact

Attackers can execute arbitrary JavaScript code during SSR by injecting malicious content through the vulnerable meta tag generation APIs, potentially leading to session hijacking, credential theft, or malicious content delivery to end users.

Affected Products

  • @remix-run/react versions 1.15.0 through 2.17.0
  • react-router versions 7.0.0 through 7.8.2
  • Applications using React Router Framework Mode with script:ld+json meta tag generation

Discovery Timeline

  • 2026-01-10 - CVE CVE-2025-59057 published to NVD
  • 2026-01-13 - Last updated in NVD database

Technical Details for CVE-2025-59057

Vulnerability Analysis

This vulnerability is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation), commonly known as Cross-Site Scripting (XSS). The flaw exists specifically within React Router's meta() function and <Meta> component when used in Framework Mode to generate script:ld+json (JSON-LD) tags for structured data.

When an application incorporates untrusted user-supplied content into the script:ld+json tag generation process, the lack of proper sanitization allows attackers to break out of the JSON context and inject arbitrary JavaScript code. This code executes during Server-Side Rendering (SSR), making it particularly dangerous as it runs in a trusted server context before the page reaches the client.

Importantly, this vulnerability does not affect applications using Declarative Mode (<BrowserRouter>) or Data Mode (createBrowserRouter/<RouterProvider>). Only Framework Mode deployments that dynamically generate JSON-LD structured data with user-controlled input are vulnerable.

Root Cause

The root cause is insufficient input sanitization when generating script:ld+json tags within the meta() and <Meta> APIs. The vulnerable code path fails to properly escape or validate content that gets embedded into these script tags, allowing special characters to break out of the intended JSON context and inject executable JavaScript.

Attack Vector

The attack is network-based and requires user interaction. An attacker must craft a malicious payload and trick a victim into visiting a page where their untrusted input is processed through the vulnerable meta()/<Meta> APIs. Due to the changed scope, a successful exploit can impact resources beyond the vulnerable component, potentially affecting the user's entire session and other origin-bound data.

The exploitation mechanism involves injecting content containing script-breaking sequences (such as </script>) followed by malicious JavaScript. When the SSR engine renders the page, this injected code executes in the server context and the resulting payload is delivered to the client.

Detection Methods for CVE-2025-59057

Indicators of Compromise

  • Unexpected </script> sequences or JavaScript code appearing in script:ld+json tags within rendered HTML
  • Anomalous JavaScript execution patterns during SSR that weren't part of the original application code
  • User reports of unexpected browser behavior or security warnings when accessing pages with dynamic meta tags
  • Log entries showing malformed JSON-LD structured data with embedded script tags

Detection Strategies

  • Audit application code for usage of meta() function or <Meta> component with dynamic, user-controlled content in Framework Mode
  • Implement Content Security Policy (CSP) headers to restrict inline script execution and detect policy violations
  • Deploy Web Application Firewall (WAF) rules to detect XSS payloads targeting JSON-LD contexts
  • Review server logs for requests containing suspicious payloads with script injection patterns

Monitoring Recommendations

  • Monitor CSP violation reports for attempts to execute unauthorized inline scripts
  • Set up alerts for unusual patterns in structured data generation endpoints
  • Implement real-time monitoring of rendered page content for script injection anomalies
  • Track dependency versions across deployments to ensure vulnerable packages are identified

How to Mitigate CVE-2025-59057

Immediate Actions Required

  • Update @remix-run/react to version 2.17.1 or later immediately
  • Update react-router to version 7.9.0 or later immediately
  • Audit all usages of meta() and <Meta> APIs to identify where user-controlled content may be processed
  • Implement input validation and sanitization for any dynamic content used in meta tag generation

Patch Information

The vulnerability has been addressed in the following patched versions:

  • @remix-run/react version 2.17.1
  • react-router version 7.9.0

For detailed information about the security fix, refer to the GitHub Security Advisory.

Workarounds

  • If immediate patching is not possible, avoid using user-controlled content in meta() or <Meta> APIs for script:ld+json generation
  • Consider switching to Declarative Mode (<BrowserRouter>) or Data Mode (createBrowserRouter/<RouterProvider>) which are not affected by this vulnerability
  • Implement strict server-side input validation to sanitize any content before it reaches the meta tag generation APIs
  • Deploy Content Security Policy headers with strict script-src directives to mitigate the impact of potential exploitation
bash
# Update @remix-run/react to patched version
npm update @remix-run/react@2.17.1

# Update react-router to patched version
npm update react-router@7.9.0

# Verify installed versions
npm list @remix-run/react react-router

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechReact Router

  • SeverityHIGH

  • CVSS Score7.6

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-79
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-22029: React Router XSS Vulnerability

  • CVE-2026-21884: React Router ScrollRestoration XSS Flaw

  • CVE-2025-68470: React Router SSRF Vulnerability

  • CVE-2026-22030: React Router CSRF Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English