ADVISORIES

GitHub Advisory Database

GHSA-2j2x-hqr9-3h42

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

Moderate CVE-2026-40181

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>)

Affected packages

EcosystemPackageAffected versions
npmreact-router
From 7.0.0 before 7.14.1 (fixed in 7.14.1)
npmreact-router
From 6.7.0 before 6.30.4 (fixed in 6.30.4)
npm@remix-run/router
From 1.3.0 before 1.23.3 (fixed in 1.23.3)

References