GHSA-2j2x-hqr9-3h42

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

At a glance

Published
Updated
CVE
CVE-2026-40181
CVSS_V4
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

Description

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](https://reactrouter.com/start/modes#declarative) (`<BrowserRouter>`)

Affected packages

PackageVersions
npm · react-routerintroduced 7.0.0, fixed 7.14.1
npm · react-routerintroduced 6.7.0, fixed 6.30.4
npm · @remix-run/routerintroduced 1.3.0, fixed 1.23.3

References

Sources

SourceLicence
OSV.devCC-BY 4.0 — GitHub Advisory Database