CVE-2026-139994: React Router: Cross-Site Scripting (XSS) - escapeHtml (JS-escape) used in HTML-attribute context for <meta refresh>
React Router is a router for React. From 7.11.0 until 7.18.4 and 8.4.0, react Router's unstable RSC Data mode and RSC Framework mode render redirects containing an attacker-controlled redirect destination into server-generated HTML without safely escaping the value. During server-side HTML rendering, crafted redirect input can break out of its HTML attribute context and execute JavaScript in the application's origin. This issue is fixed in versions 7.18.4 and 8.4.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 7.18.4 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.4.0
Event History
Frequently Asked Questions
Which applications are affected?
Applications using React Router's unstable RSC Data mode or RSC Framework mode with server-side HTML rendering are affected if they use versions from 7.11.0 before 7.18.4, or version 8.4.0 as identified in the advisory.
What does an attacker need to exploit this issue?
An attacker needs to supply a crafted redirect destination that is rendered into the server-generated HTML. Exploitation also requires a user interaction, as reflected by the UI:R vector.
What is the impact of successful exploitation?
A crafted redirect value can escape its HTML attribute context in a meta refresh element and execute JavaScript in the application's origin. The supplied severity vector indicates integrity impact but no direct confidentiality or availability impact.
How can this be remediated?
Upgrade React Router to version 7.18.4 or the fixed 8.4.0 release.