5.3medium
Nitro: Open Redirect via Protocol-Relative URL Bypass in Wildcard Route Rules
- Severity
- 5.3medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.28% (higher than 21% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-9phm-9p8f-hw5m
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| nitrojs nitro | < 3.0.260429-beta | CVE List |
| nitrojs nitropack | < 2.13.4 | CVE List |
| nitro (npm) | before 3.0.260429-beta | GitHub Advisory Database |
| nitropack (npm) | before 2.13.4 | GitHub Advisory Database |
| nitro nitro | before 2.13.4, from >2.13.4 before 3.0.260429 | NVD |
All scores
| GitHub_M | 5.3medium CVSS:4.0 | 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 |
| GitHub | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| GitHub | medium CVSS:4.0 | 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 |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.
What each source says
CVE List
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.
GitHub Advisory Database
A redirect route rule like:
routeRules: {
"/legacy/**": { redirect: "/**" }
}
is 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:
GET /legacy//evil.com
Nitro 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.
Are you affected?
Users may be affected if all of the following are true:
- Their project uses Nitro's
routeRuleswith aredirectentry. - The target uses a
/**wildcard suffix to forward sub-paths (e.g.redirect: "/**",redirect: "/new/**",proxy: { to: "http://upstream/**" }). - The
redirectrule is not handled natively at the CDN layer. Thevercel,netlify,cloudflare-pages, andedgeonepresets translaterouteRules.redirectinto 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.
Impact
Open 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.
Patched versions
Upgrade to one of:
- 2.13.4 or later (or upgrade lockfile with latest ufo 1.6.4+)
- 3.0.260429-beta or later (https://github.com/nitrojs/nitro/pull/4236)
The fix has two parts:
ufois bumped to^1.6.4(unjs/ufo@5cd9e67), which collapses any run of leading slashes to a single/insidewithoutBase. This covers the typical"/scope/**"rule.- The Nitro runtime additionally collapses leading
//before joining when the rule path itself is/**(in rare case which casewithoutBaseis never called and the raw pathname flows straight intojoinURL("", …)).
NVD (es)
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.
References
| https://github.com/nitrojs/nitro/security/advisories/GHSA-9phm-9p8f-hw5m | vendor-advisory, web | |
| https://github.com/nitrojs/nitro/pull/4236 | issue-tracking, patch, web | |
| https://github.com/nitrojs/nitro/releases/tag/v2.13.4 | release-notes, web | |
| https://github.com/nitrojs/nitro/releases/tag/v3.0.260429-beta | release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-44372 | advisory | |
| https://github.com/unjs/ufo/commit/5cd9e676711af3f4e4b5398ddf6ca8d52c1c7e1f | web | |
| https://github.com/nitrojs/nitro | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-44372 changed 2026-05-14 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-9phm-9p8f-hw5m changed 2026-06-09 | CC-BY-4.0 |
| NVD | CVE-2026-44372 changed 2026-10-26 | Public domain |