Skip to content
Heist/ feed
Back to feed
Medium

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

Type: advisorySources: OSV

React Router is a router for React. In versions 7.0.0 through 7.14.0 and 6.7.0 through 6.30.3, certain URLs passed to the redirect function can trigger an open redirect to an external domain due to path values starting with // being reinterpreted as protocol-relative URLs. The level of impact depends on the validation done by the application prior to returning the redirect. This does not impact applications using Declarative Mode (). This is patched in versions 7.14.1 and 6.30.4.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-40181
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 10:46 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 2 Jun 2026, 17:55 UTC

React Router is a router for React. In versions 7.0.0 through 7.14.0 and 6.7.0 through 6.30.3, certain URLs passed to the redirect function can trigger an open redirect to an external domain due to path values starting with // being reinterpreted as protocol-relative URLs. The level of impact depends on the validation done by the application prior to returning the redirect. This does not impact applications using Declarative Mode (). This is patched in versions 7.14.1 and 6.30.4.

osv:CVE-2026-40181
Complete source record
{
  "id": "d2300cbccc1450e59e8c1157a388dbff24c1b8697dbb45f6305a87bfc08b883d",
  "url": "https://osv.dev/vulnerability/CVE-2026-40181",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "React Router's same-origin redirect with path starting // causes open redirect via protocol-relative URL reinterpretation",
    "summary": "React Router is a router for React. In versions 7.0.0 through 7.14.0 and 6.7.0 through 6.30.3, certain URLs passed to the redirect function can trigger an open redirect to an external domain due to path values starting with // being reinterpreted as protocol-relative URLs. The level of impact depends on the validation done by the application prior to returning the redirect. This does not impact applications using Declarative Mode (). This is patched in versions 7.14.1 and 6.30.4.",
    "evidence": "osv:CVE-2026-40181",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-40181",
      "aliases": [
        "CVE-2026-40181",
        "GHSA-2j2x-hqr9-3h42"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/remix-run/react-router",
              "type": "GIT",
              "events": [
                {
                  "introduced": "74979cb5f84092d83adcf5cda5bf281b3450683c"
                },
                {
                  "fixed": "72973b6493d27014aa76a23a95e3ca186616c4fd"
                },
                {
                  "introduced": "e8e3b004d94a949372e77ce97a543bff5bc6fb89"
                },
                {
                  "fixed": "197674ba9fc1b72b452e17894e5e783bdab7a087"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:shopify:react-router:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "6.7.0"
                      },
                      {
                        "fixed": "6.30.4"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:shopify:react-router:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "7.0.0"
                      },
                      {
                        "fixed": "7.14.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-40181.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:28.299231578Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40181.json",
        "https://github.com/remix-run/react-router/security/advisories/GHSA-2j2x-hqr9-3h42",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-40181"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-601"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40181.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-40181",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 494641,
  "published_at": "2026-06-02T17:55:09.919+00:00"
}