CVE-2026-139998: React Router: Polynomial-time ReDoS in matchPath and matchRoutes trailing-slash handling
React Router is a router for React. From 6.0.0 until 7.18.3 and 8.3.1, react Router's regular-expression-based route matching can perform excessive work when processing specially crafted long paths. Declarative, Data, Framework, unstable RSC Data, and unstable RSC Framework applications can consume excessive CPU in the browser or server, depending on where matching occurs, causing denial of service. This issue is fixed in versions 7.18.3 and 8.3.1.
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.3 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.3.1
Event History
Frequently Asked Questions
Which components can experience the denial-of-service impact?
Excessive CPU consumption can occur in the browser or on the server, depending on where route matching is performed. Declarative, Data, Framework, unstable RSC Data, and unstable RSC Framework applications are affected.
What upgrade versions remediate the issue?
Upgrade to React Router version 7.18.3 or 8.3.1, which contain the fix.