MediumGHSA-2j2x-hqr9-3h42CVE-2026-40181

React Router's same-origin redirect with path starting // causes open redirect via protocol-relative URL reinterpretation

Published 3 Jun 2026 · Updated 10 Sept 2026

Affected packages

Affected
>=7.0.0 <7.14.1
Fixed in
7.14.1
Update to the fixed version for your release line, for example:npm install react-router@7.14.1
Affected
>=6.7.0 <6.30.4
Fixed in
6.30.4
Update to the fixed version for your release line, for example:npm install react-router@6.30.4
Affected
>=1.3.0 <1.23.3
Fixed in
1.23.3
Update to the fixed version for your release line, for example:npm install @remix-run/router@1.23.3

Details

Certain URLs passed to the redirect function can trigger an open redirect to an external domain depending on the level of validation done by the application prior to returning the redirect.

> [!NOTE] > This does not impact your React Router application if you are using Declarative Mode (<BrowserRouter>)

Is GHSA-2j2x-hqr9-3h42 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected react-router, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.