Nitro CVE-2026-44372
MEDIUMSeverity by source
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Network-delivered, no auth required, user must click crafted link (UI:R); only integrity impact (redirect manipulation) on the user side, no server confidentiality or availability impact.
Primary rating from GitHub Advisory.
CVSS VectorGitHub Advisory
Lifecycle Timeline
4Blast Radius
ecosystem impact- 21 npm packages depend on nitro (11 direct, 10 indirect)
- 805 npm packages depend on nitropack (173 direct, 643 indirect)
Ecosystem-wide dependent count for version 3.0.260429-beta and other introduced versions.
DescriptionGitHub Advisory
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.comNitro 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("", …)).
AnalysisAI
Open redirect in Nitro (npm packages nitropack and nitro) allows unauthenticated remote attackers to redirect users to arbitrary external hosts by inserting a double slash after a wildcard route rule prefix. Nitro's withoutBase path-stripping preserved //evil.com remnants verbatim in Location response headers; browsers silently resolve //host as a protocol-relative URL against the current scheme, sending victims to attacker-controlled infrastructure while the initial URL appears to belong to the legitimate server. No active exploitation is confirmed (not in CISA KEV), EPSS is 0.04%, but the attack is trivially reproducible from the advisory description alone; patched versions are available.
Technical ContextAI
The root cause is CWE-601 (URL Redirection to Untrusted Site). Nitro's route rule engine processes wildcard redirect rules by stripping the matched path prefix from the incoming request URL using the ufo library's withoutBase() function, then joining the remainder to the rule's redirect target via joinURL. Prior to the fix, withoutBase('/legacy//evil.com', '/legacy') returned //evil.com - the double-slash was preserved intact - because the function simply sliced the base off the string without normalizing leading slashes on the remainder. When Nitro subsequently called joinURL('', '//evil.com'), the double-slash survived into the Location header. Per RFC 3986, //authority/path is a valid network-path reference, and all major browsers interpret //evil.com as https://evil.com (inheriting the page scheme), causing a silent cross-origin redirect. Affected packages are pkg:npm/nitropack (versions < 2.13.4) and pkg:npm/nitro (versions < 3.0.260429-beta). The fix has two parts: ufo 1.6.4 collapses leading slashes in withoutBase via .replace(/^\/+/, '') before prepending a single slash; and Nitro's own runtime adds a targetPath.replace(/^\/+/, '/') guard for the edge case where the rule path itself is /**, bypassing withoutBase entirely.
RemediationAI
Upgrade nitropack to version 2.13.4 or later, or nitro to 3.0.260429-beta or later, per the vendor advisory at https://github.com/nitrojs/nitro/security/advisories/GHSA-9phm-9p8f-hw5m. After upgrading, regenerate your lockfile to ensure ufo resolves to 1.6.4+ (the PR diff at https://github.com/nitrojs/nitro/pull/4236 shows ufo bumped from 1.6.3 to 1.6.4); both the Nitro runtime fix and the ufo transitive fix are required for full coverage. If immediate patching is blocked, deploying under a vercel, netlify, cloudflare-pages, or edgeone preset eliminates the vulnerability entirely by moving redirect handling off the Nitro runtime - note this may require deployment pipeline changes. A WAF rule rejecting requests where the path contains // immediately after the wildcard rule prefix (e.g., blocking /legacy//) is an effective compensating control with minimal side effects, since double-slash path segments are rarely legitimate. Removing wildcard /** redirect rules and replacing them with explicit per-path redirects eliminates the attack surface completely but requires enumerating all paths and reduces configuration flexibility.
More in Open Redirect
View allA malicious third-party can give a crafted "ssh://..." URL to an unsuspecting victim, and an attempt to visit the URL ca
GFI Kerio Control versions 9.2.5 through 9.4.5 contain an HTTP response splitting vulnerability in the dest parameter of
PHP through 7.0.8 does not attempt to address RFC 3875 section 4.1.18 namespace conflicts and therefore does not protect
Multiple open redirect vulnerabilities in Apache Struts 2.0.0 through 2.3.15 allow remote attackers to redirect users to
Open redirect vulnerability in age-verification.php in the Age Verification plugin 0.4 and earlier for WordPress allows
Open redirect vulnerability in Kaseya Virtual System Administrator (VSA) 7.x before 7.0.0.29, 8.x before 8.0.0.18, 9.0 b
Vulnerability in the Oracle Applications Framework component of Oracle E-Business Suite (subcomponent: Popup windows (li
Unspecified vulnerability in the Oracle Application Server Single Sign-On component in Oracle Fusion Middleware 10.1.4.3
Flarum is open source discussion platform software. Rated medium severity (CVSS 6.5), this vulnerability is remotely exp
Open redirect vulnerability in Novius OS 5.0.1 (Elche) allows remote attackers to redirect users to arbitrary web sites
Open redirect vulnerability in the Redirect function in stageshow_redirect.php in the StageShow plugin before 5.0.9 for
Nteract v.0.28.0 was discovered to contain a remote code execution (RCE) vulnerability via the Markdown link. Rated crit
Share
External POC / Exploit Code
Leaving vuln.today
GHSA-9phm-9p8f-hw5m