{"id":"CVE-2026-44372","aliases":["CVE-2026-44372","GHSA-9phm-9p8f-hw5m"],"related":[],"kind":"vulnerability","state":"published","title":"Nitro: Open Redirect via Protocol-Relative URL Bypass in Wildcard Route Rules","summary":"Nitro is a next generation server toolkit. Prior to 3.0.260429-beta, an attacker could turn a redirect route rule using wildcards rewrite into a cross-host redirect by sliding an extra slash in after the rule prefix. This vulnerability is fixed in 3.0.260429-beta.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Nitro is a next generation server toolkit. Prior to 3.0.260429-beta, an attacker could turn a redirect route rule using wildcards rewrite into a cross-host redirect by sliding an extra slash in after the rule prefix. This vulnerability is fixed in 3.0.260429-beta.","source":"cvelist"},{"lang":"en","text":"A redirect route rule like:\n\n```ts\nrouteRules: {\n  \"/legacy/**\": { redirect: \"/**\" }\n}\n```\n\nis intended to rewrite paths within the same host. Before the patch, an attacker could turn the rewrite into a cross-host redirect by sliding an extra slash in after the rule prefix. Example exploit:\n\n```\nGET /legacy//evil.com\n```\n\nNitro stripped `/legacy` from the matched pathname and joined the remainder against the rule's target. The remainder was `//evil.com`, which the join preserved verbatim, so Nitro responded with `Location: //evil.com`. Browsers resolve `//evil.com` as a protocol-relative URL against the current scheme, sending the user to `https://evil.com`. \n\n### Are you affected?\n\nUsers may be affected if **all** of the following are true:\n\n1. Their project uses Nitro's `routeRules` with a `redirect` entry.\n2. The target uses a `/**` wildcard suffix to forward sub-paths (e.g. `redirect: \"/**\"`, `redirect: \"/new/**\"`, `proxy: { to: \"http://upstream/**\" }`).\n3. The `redirect` rule is _not_ handled natively at the CDN layer. The `vercel`, `netlify`, `cloudflare-pages`, and `edgeone` presets translate `routeRules.redirect` into platform config (`vercel.json`, `_redirects`, EdgeOne v3 config) and serve the redirect at the edge — those deployments bypass the Nitro runtime entirely and are not affected. Every other preset executes the redirect through the Nitro runtime and can be vulnerable.\n\n## Impact\n\nOpen redirect from any host serving Nitro with a wildcard `redirect` rule. The redirect target is fully attacker-controlled, the URL looks legitimate (it starts with the victim's domain), and the browser silently follows it.\n\n## Patched versions\n\nUpgrade to one of:\n\n- [2.13.4](https://github.com/nitrojs/nitro/releases/tag/v2.13.4) or later (or upgrade lockfile with latest ufo 1.6.4+)\n- [3.0.260429-beta](https://github.com/nitrojs/nitro/releases/tag/v3.0.260429-beta) or later (https://github.com/nitrojs/nitro/pull/4236)\n\nThe fix has two parts:\n\n1. `ufo` is bumped to `^1.6.4` ([unjs/ufo@5cd9e67](https://github.com/unjs/ufo/commit/5cd9e676711af3f4e4b5398ddf6ca8d52c1c7e1f)), which collapses any run of leading slashes to a single `/` inside `withoutBase`. This covers the typical `\"/scope/**\"` rule.\n2. The Nitro runtime additionally collapses leading `//` before joining when the rule path itself is `/**` (in rare case which case `withoutBase` is never called and the raw pathname flows straight into `joinURL(\"\", …)`).","format":"markdown","source":"ghsa"},{"lang":"es","text":"Nitro es un kit de herramientas de servidor de próxima generación. Antes de 3.0.260429-beta, un atacante podría convertir una regla de ruta de redirección que utiliza la reescritura de comodines en una redirección entre hosts deslizando una barra adicional después del prefijo de la regla. Esta vulnerabilidad está corregida en 3.0.260429-beta.","source":"nvd"}],"published":"2026-05-06T23:02:45.000Z","modified":"2026-10-26T14:10:00.130Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-601"],"affected":[{"ranges":[{"version":"< 3.0.260429-beta","status":"affected"}],"vendor":"nitrojs","product":"nitro","source":"cvelist"},{"ranges":[{"version":"< 2.13.4","status":"affected"}],"vendor":"nitrojs","product":"nitropack","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.0.260429-beta"}],"ecosystem":"npm","package":"nitro","purl":"pkg:npm/nitro","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.13.4"}],"ecosystem":"npm","package":"nitropack","purl":"pkg:npm/nitropack","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.13.4"},{"status":"affected","introduced":">2.13.4","fixed":"3.0.260429"}],"vendor":"nitro","product":"nitro","cpe":"cpe:2.3:a:nitro:nitro:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/nitrojs/nitro/security/advisories/GHSA-9phm-9p8f-hw5m","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nitrojs/nitro/pull/4236","tags":["issue-tracking","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nitrojs/nitro/releases/tag/v2.13.4","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/nitrojs/nitro/releases/tag/v3.0.260429-beta","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44372","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/unjs/ufo/commit/5cd9e676711af3f4e4b5398ddf6ca8d52c1c7e1f","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/nitrojs/nitro","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"total","date":"2026-05-14T15:46:57.649Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-44372","url":"https://www.cve.org/CVERecord?id=CVE-2026-44372","licence":"CVE Terms of Use","modified":"2026-05-14T15:47:06.216Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-9phm-9p8f-hw5m","url":"https://github.com/advisories/GHSA-9phm-9p8f-hw5m","licence":"CC-BY-4.0","modified":"2026-06-09T02:15:07.214Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-44372","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44372","licence":"Public domain","modified":"2026-10-26T14:10:00.130Z"}],"updatedAt":"2026-11-25T22:59:21.663Z","epss":{"score":0.0028,"percentile":0.21941,"date":"2026-12-01T12:00:22.000Z"}}