Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. react-router
  4. ›
  5. CVE-2026-40181

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

June 3, 2026

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

References

  • github.com/advisories/GHSA-2j2x-hqr9-3h42
  • github.com/remix-run/react-router/security/advisories/GHSA-2j2x-hqr9-3h42
  • nvd.nist.gov/vuln/detail/CVE-2026-40181

Code Behaviors & Features

Detect and mitigate CVE-2026-40181 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 6.7.0 before 6.30.4, all versions starting from 7.0.0 before 7.14.1

Fixed versions

  • 6.30.4
  • 7.14.1

Solution

Upgrade to versions 6.30.4, 7.14.1 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-601: URL Redirection to Untrusted Site ('Open Redirect')

Source file

npm/react-router/CVE-2026-40181.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Thu, 04 Jun 2026 12:17:10 +0000.