CVE-2025-68470 Overview
React Router, a widely-used routing library for React applications, contains an open redirect vulnerability (CWE-601) that allows attackers to craft malicious paths that redirect users to external URLs. When a React Router application navigates to an attacker-supplied path via navigate(), <Link>, or redirect(), the application can inadvertently perform navigation to an external URL controlled by the attacker.
Critical Impact
Applications passing untrusted user input to React Router navigation functions are vulnerable to open redirect attacks, potentially leading to phishing, credential theft, or malicious content delivery.
Affected Products
- React Router versions 6.0.0 through 6.30.1
- React Router versions 7.0.0 through 7.9.5
Discovery Timeline
- 2026-01-10 - CVE CVE-2025-68470 published to NVD
- 2026-01-13 - Last updated in NVD database
Technical Details for CVE-2025-68470
Vulnerability Analysis
This vulnerability is classified as an Open Redirect (CWE-601), which occurs when an application accepts user-controlled input that specifies a link to an external site, and uses that link in a redirect. In the case of React Router, the routing logic fails to properly validate paths passed to navigation functions, allowing specially crafted paths to be interpreted as external URLs.
The vulnerability affects applications that pass untrusted content into navigation paths. This is particularly concerning in scenarios where query parameters, form inputs, or other user-controlled data is used to determine navigation destinations. An attacker can exploit this to redirect users away from the legitimate application to malicious sites for phishing attacks or malware distribution.
Root Cause
The root cause lies in insufficient validation of navigation path inputs within React Router's navigation handling. The routing library does not adequately distinguish between internal application paths and external URLs when processing navigation requests. This allows specially crafted path strings to bypass intended routing restrictions and trigger external navigation.
Attack Vector
The attack requires network access and an authenticated user session. An attacker can craft a malicious URL containing a specially formatted path that, when processed by React Router's navigate(), <Link>, or redirect() functions, causes the application to redirect to an attacker-controlled external domain.
The exploitation scenario typically involves:
- Identifying a React Router application that passes user input to navigation functions
- Crafting a malicious path that exploits the URL parsing inconsistency
- Delivering the malicious link to victims (via phishing, social engineering, or injected content)
- When victims click the link, the React Router application redirects them to the attacker's site
For detailed technical analysis and proof-of-concept information, refer to the GitHub Security Advisory.
Detection Methods for CVE-2025-68470
Indicators of Compromise
- Unusual navigation patterns in client-side logs showing redirects to external domains
- User reports of unexpected redirects when using the application
- Web server access logs showing referrer headers from your application to suspicious external sites
- Application monitoring alerts for navigation to non-whitelisted domains
Detection Strategies
- Implement Content Security Policy (CSP) headers with navigate-to directive to restrict allowed navigation targets
- Monitor client-side error logs for navigation to unexpected external URLs
- Review application code for instances where user input is passed directly to navigate(), <Link>, or redirect()
- Use static analysis tools to identify untrusted data flow to React Router navigation functions
Monitoring Recommendations
- Configure web application firewalls to detect and log potential open redirect attack patterns
- Implement client-side navigation monitoring to flag redirects to external domains
- Set up alerting for sudden increases in external navigation events from your application
- Review and audit navigation target whitelists regularly
How to Mitigate CVE-2025-68470
Immediate Actions Required
- Upgrade React Router to version 6.30.2 or 7.9.6 or later immediately
- Audit all code paths where user input is used in navigation functions
- Implement input validation for any navigation paths derived from user input
- Consider implementing a navigation whitelist for allowed redirect destinations
Patch Information
The vulnerability has been patched in React Router versions 6.30.2 and 7.9.6. Organizations should update their dependencies to these versions or later. The fix addresses the URL parsing logic to properly distinguish between internal paths and external URLs.
For additional information, see the GitHub Security Advisory.
Workarounds
- Validate all navigation paths against a whitelist of allowed internal routes before passing to navigation functions
- Implement server-side redirect validation as a defense-in-depth measure
- Use absolute paths with explicit origin checking when handling dynamic navigation targets
- Consider implementing a centralized navigation utility that validates all paths before routing
# Example: Update React Router to patched version
npm update react-router-dom@^6.30.2
# or for v7
npm update react-router-dom@^7.9.6
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


