CVE-2026-33131 h3 has a middleware bypass with one gadget
Attackers can bypass authentication middleware in H3 applications by spoofing the Host header, allowing unauthorized access to protected routes.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-33131?
CVE-2026-33131 is a high-severity authentication bypass vulnerability in h3js h3, published on 20 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
H3 is a minimal H(TTP) framework. Versions 2.0.0-0 through 2.0.1-rc.14 contain a Host header spoofing vulnerability in the NodeRequestUrl (which extends FastURL) which allows middleware bypass. When event.url, event.url.hostname, or event.url._url is accessed, such as in a logging middleware, the _url getter constructs a URL from untrusted data, including the user-controlled Host header. Because H3's router resolves the route handler before middleware runs, an attacker can supply a crafted Host header (e.g., Host: localhost:3000/abchehe?) to make the middleware path check fail while the route handler still matches, effectively bypassing authentication or authorization middleware. This affects any application built on H3 (including Nitro/Nuxt) that accesses event.url properties in middleware guarding sensitive routes. The issue requires an immediate fix to prevent FastURL.href from being constructed with unsanitized, attacker-controlled input. Version 2.0.1-rc.15 contains a patch for this issue.
Weakness: CWE-290
Which versions are affected by CVE-2026-33131?
2 open source packages ship an affected version, including h3. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
h3 npm | From 2.0.0-0 | 2.0.1-rc.15 |
h3 npm | From 2.0.0-0 | 2.0.1-rc.15 |
Products include H3 H3.
How do I fix CVE-2026-33131?
Upgrade h3 to 2.0.1-rc.15 or later.
Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.
Is CVE-2026-33131 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33131 exists.
Other vulnerabilities in h3js h3
- CVE-2026-23527 h3 v1 has Request Smuggling (TE.TE) issue
- CVE-2026-33128 h3 has a Server-Sent Events Injection via Unsanitized Newlines in Event Stream Fields
- CVE-2026-33129 h3 has an observable timing discrepancy in basic auth utils
- CVE-2026-33490 h3: Missing Path Segment Boundary Check in `mount()` Causes Middleware Execution on Unrelated Prefix-Matching Routes
Sources
Also known as GHSA-3vj8-jmxq-cgj5.