Vulnerabilities in pkg:npm/nitro

PACKAGE
Advisory Identifier: GHSA-9phm-9p8f-hw5m
Advisory Summary

CVE-2026-44372 is a MODERATE (CVSS 6.1) nitro has an open redirect vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Nitro libraries in the npm ecosystem. The issue involves nitro has an open redirect via protocol-relative url bypass in wildcard route rules. Remediation is available by upgrading affected packages to version 3.0.260429-beta, 2.13.4.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/nitro

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/nitro. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-9phm-9p8f-hw5m CVE-2026-44372 MODERATE Nitro has an Open Redirect via Protocol-Relative URL Bypass in Wildcard Route Rules
GHSA-5w89-w975-hf9q CVE-2026-44373 MODERATE Nitro has a proxy scope bypass via percent-encoded path traversal in `routeRules`

CVE-2026-44372 at a Glance

CVE Identifier CVE-2026-44372
GHSA Identifier GHSA-9phm-9p8f-hw5m
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product Nitro
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-44372

To remediate this vulnerability, upgrade all affected Nitro dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

nitro fixed: 3.0.260429-beta
npm install nitro@3.0.260429-beta
nitropack fixed: 2.13.4
npm install nitropack@2.13.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls nitro

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-44372, inspect your project dependencies using npm:

npm ls nitro

Analyze the terminal output to locate any version of Nitro in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.260429-beta), your application is affected.

Note: The npm ls nitro command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Nitro, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A redirect route rule like: ```ts 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: 1. Their project uses Nitro's `routeRules` with a `redirect` entry. 2. The target uses a `/**` wildcard suffix to forward sub-paths (e.g. `redirect: "/**"`, `redirect: "/new/**"`, `proxy: { to: "http://upstream/**" }`). 3. 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. ## 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](https://github.com/nitrojs/nitro/releases/tag/v2.13.4) or later (or upgrade lockfile with latest ufo 1.6.4+) - [3.0.260429-beta](https://github.com/nitrojs/nitro/releases/tag/v3.0.260429-beta) or later (https://github.com/nitrojs/nitro/pull/4236) The fix has two parts: 1. `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. 2. 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("", …)`).

CVE-2026-44372 Affected Nitro Versions

2 component(s)
Fixed Versions:
3.0.260429-beta2.13.4
Product / Package Ecosystem Affected Versions Fixed Version
nitro
npm
< 3.0.260429-beta
3.0.260429-beta
nitropack
npm
< 2.13.4
2.13.4

References

Frequently Asked Questions

What is CVE-2026-44372?
CVE-2026-44372 is a security vulnerability in Nitro involving Nitro has an Open Redirect via Protocol-Relative URL Bypass in Wildcard Route Rules under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which Nitro versions are affected?
Affected versions include releases prior to 3.0.260429-beta, 2.13.4 across affected packages: nitro, nitropack.
What version fixes CVE-2026-44372?
Upgrading to 3.0.260429-beta, 2.13.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is nitro affected?
Yes, nitro is affected in releases prior to 3.0.260429-beta. Upgrade your dependency to 3.0.260429-beta or later.
Is nitropack affected?
Yes, nitropack is affected in releases prior to 2.13.4. Upgrade your dependency to 2.13.4 or later.
What is the CVSS score of CVE-2026-44372?
CVE-2026-44372 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2026-44372?
CVE-2026-44372 is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect') (The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.).
How can I check npm dependencies for CVE-2026-44372?
Run the dependency tree command: 'npm ls nitro'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-9phm-9p8f-hw5m",
  "modified" : "2026-06-09T01:58:50Z",
  "published" : "2026-05-06T23:02:45Z",
  "aliases" : [ "CVE-2026-44372" ],
  "summary" : "Nitro has an Open Redirect via Protocol-Relative URL Bypass in Wildcard Route Rules",
  "details" : "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(\"\", …)`).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "nitro"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.260429-beta"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "nitropack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.13.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nitrojs/nitro/security/advisories/GHSA-9phm-9p8f-hw5m"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-44372"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nitrojs/nitro/pull/4236"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/unjs/ufo/commit/5cd9e676711af3f4e4b5398ddf6ca8d52c1c7e1f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nitrojs/nitro"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nitrojs/nitro/releases/tag/v2.13.4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nitrojs/nitro/releases/tag/v3.0.260429-beta"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-601" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-06T23:02:45Z",
    "nvd_published_at" : "2026-05-13T21:16:47Z"
  }
}