A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-2026-40181

CVE-2026-40181: React Router Open Redirect Vulnerability

CVE-2026-40181 is an open redirect vulnerability in React Router affecting versions 7.0.0-7.14.0 and 6.7.0-6.30.3. Attackers can exploit protocol-relative URLs to redirect users to external domains. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: June 4, 2026

CVE-2026-40181 Overview

CVE-2026-40181 is an open redirect vulnerability [CWE-601] affecting React Router, a popular routing library for React applications. The flaw exists in the redirect function, where URLs starting with // are reinterpreted as protocol-relative URLs. Attackers can craft input that causes the application to redirect users to attacker-controlled external domains.

The issue affects React Router versions 7.0.0 through 7.14.0 and 6.7.0 through 6.30.3. Applications using Declarative Mode with <BrowserRouter> are not affected. Patches are available in versions 7.14.1 and 6.30.4.

Critical Impact

Attackers can redirect authenticated users to phishing domains or malicious endpoints, undermining user trust and enabling credential theft when applications fail to validate redirect targets.

Affected Products

  • React Router versions 7.0.0 through 7.14.0
  • React Router versions 6.7.0 through 6.30.3
  • Applications using the redirect function in Framework or Data modes

Discovery Timeline

  • 2026-06-02 - CVE-2026-40181 published to NVD
  • 2026-06-02 - Last updated in NVD database

Technical Details for CVE-2026-40181

Vulnerability Analysis

The vulnerability stems from how React Router's redirect helper processes path values. When a path begins with //, browsers and URL parsers interpret it as a protocol-relative URL rather than a same-origin path. React Router did not normalize or reject such inputs before issuing the redirect response.

An attacker can supply a path such as //evil.example.com/login through query parameters, form submissions, or other user-controlled inputs that flow into redirect. The application then issues an HTTP redirect to the external host, sending the victim away from the trusted site. The impact depends on whether the calling application validates redirect targets before invoking the function.

Applications using Declarative Mode through <BrowserRouter> do not invoke the affected server-side redirect function and are not vulnerable. Framework Mode and Data Mode applications that pass untrusted input to redirect are the primary attack surface.

Root Cause

The redirect function in affected versions does not distinguish between same-origin paths and protocol-relative URLs. Strings beginning with // are valid protocol-relative URLs per RFC 3986 and resolve to external hosts when used in Location headers. Missing input normalization allowed these strings to flow through unchanged.

Attack Vector

The attacker crafts a URL such as https://victim-app.example/login?returnTo=//attacker.example/phish. The application reads returnTo and passes it to redirect(returnTo). The browser receives a 302 response with Location: //attacker.example/phish and navigates to the attacker domain while preserving the original protocol. This pattern is commonly used in phishing campaigns that mimic post-login redirects to harvest credentials or session tokens.

No verified public exploit code is available. See the GitHub Security Advisory for additional technical detail.

Detection Methods for CVE-2026-40181

Indicators of Compromise

  • HTTP responses from the application containing Location headers with values beginning with // followed by an external hostname.
  • Inbound requests with query or form parameters containing values starting with // targeting redirect endpoints such as returnTo, next, redirect, or url.
  • Web server access logs showing redirect responses immediately followed by user traffic to unfamiliar external domains.

Detection Strategies

  • Audit application source for calls to redirect() from react-router and react-router-dom and verify input is validated before being passed.
  • Run software composition analysis to identify deployed versions of react-router and react-router-dom in the vulnerable ranges.
  • Inspect reverse proxy or CDN logs for 3xx responses with protocol-relative Location headers leaving the trusted origin.

Monitoring Recommendations

  • Alert on outbound Location headers whose hostname does not match the application's allowlist of trusted domains.
  • Monitor authentication flows for redirects that terminate on third-party domains shortly after login.
  • Add web application firewall rules to flag request parameters containing // or URL-encoded variants such as %2F%2F in redirect-related fields.

How to Mitigate CVE-2026-40181

Immediate Actions Required

  • Upgrade react-router and react-router-dom to version 7.14.1 or 6.30.4 depending on your major version line.
  • Audit every call to the redirect function and confirm that inputs originate from trusted sources or are validated against an allowlist.
  • Reject or normalize any redirect target that begins with //, http://, or https:// and does not match the application origin.

Patch Information

The maintainers released fixed versions 7.14.1 and 6.30.4. Details are documented in the React Router GHSA-2j2x-hqr9-3h42 advisory. Update package manifests and rebuild affected applications.

Workarounds

  • Validate redirect targets server-side by parsing them with the URL constructor against the application origin and rejecting any host mismatch.
  • Strip leading slashes and other URL scheme indicators from user-supplied redirect values before passing them to redirect.
  • Switch routing to Declarative Mode using <BrowserRouter> where feasible, as that mode is not affected.
bash
# Upgrade React Router to a patched version
npm install react-router@7.14.1 react-router-dom@7.14.1
# or for the 6.x line
npm install react-router@6.30.4 react-router-dom@6.30.4

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

  • Vulnerability Details
  • TypeOther

  • Vendor/TechReact Router

  • SeverityMEDIUM

  • CVSS Score6.6

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:U/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-601
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2025-43865: React Router Data Spoofing Vulnerability

  • CVE-2026-33244: Shopify React-router XSS Vulnerability

  • CVE-2026-42342: React Router DoS Vulnerability

  • CVE-2026-42211: React Router Framework Mode RCE Flaw
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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