CVE-2026-33490 Overview
CVE-2026-33490 is an input validation vulnerability affecting H3, a minimal H(TTP) framework for JavaScript. The vulnerability exists in versions 2.0.0-0 through 2.0.1-rc.16 where the mount() method uses an insecure startsWith() check to determine whether incoming requests fall under a mounted sub-application's path prefix. This flaw allows attackers to trigger middleware on unintended paths, potentially polluting request context with unintended privilege flags.
Critical Impact
Attackers can bypass path-based middleware restrictions by crafting URLs that share the same prefix as protected paths, potentially triggering context-setting middleware on paths it was never intended to cover.
Affected Products
- H3 HTTP Framework versions 2.0.0-0 through 2.0.1-rc.16
Discovery Timeline
- 2026-03-26 - CVE CVE-2026-33490 published to NVD
- 2026-03-26 - Last updated in NVD database
Technical Details for CVE-2026-33490
Vulnerability Analysis
The vulnerability stems from improper path prefix validation in the H3 framework's routing mechanism. When developers mount middleware or sub-applications on a specific path prefix using the mount() method, the framework performs a simple string comparison using JavaScript's startsWith() function. This approach fails to verify path segment boundaries, meaning it does not check that the character immediately following the base path is either a forward slash (/) or the end of the string.
For example, if middleware is registered on /admin to enforce authentication or set administrative context flags, the current implementation will also execute that middleware for requests to /admin-public, /administrator, or /adminstuff since all these paths start with the string "admin". This behavior violates the principle of least privilege and can lead to unintended request context pollution.
Root Cause
The root cause is classified as CWE-706 (Use of Incorrectly-Resolved Name or Reference). The mount() method's path matching logic relies solely on startsWith() without enforcing proper path segment boundary validation. This creates an authorization bypass scenario where the framework incorrectly resolves which requests should be handled by mounted middleware based on superficial string matching rather than proper path hierarchy analysis.
Attack Vector
An attacker can exploit this vulnerability by sending HTTP requests to paths that share a common prefix with protected mount points but are not actually intended to be covered by the associated middleware. This is a network-based attack that requires no authentication and no user interaction.
The attack scenario works as follows: if an application mounts authentication middleware on /admin, an attacker can send requests to paths like /administrator or /admin-public. These paths will incorrectly trigger the /admin middleware, potentially setting privilege flags or administrative context that the attacker can then leverage for unauthorized actions on what should be publicly accessible endpoints.
Since there are no verified code examples available for this vulnerability, the technical implementation details can be found in the GitHub Security Advisory.
Detection Methods for CVE-2026-33490
Indicators of Compromise
- Unusual HTTP requests to paths that share prefixes with administrative or protected mount points (e.g., /admin-*, /api-* variations)
- Unexpected privilege escalation or context pollution in application logs
- Authentication or authorization middleware being triggered on unprotected routes
Detection Strategies
- Review application logs for requests to paths that closely resemble protected mount points but have additional suffixes
- Implement monitoring for middleware execution patterns that don't align with expected path configurations
- Conduct code audits to identify all mount() usages and verify path matching behavior
Monitoring Recommendations
- Enable verbose logging for middleware execution to track which paths trigger which handlers
- Monitor for anomalous request patterns targeting path variations of protected endpoints
- Implement web application firewall rules to detect path prefix manipulation attempts
How to Mitigate CVE-2026-33490
Immediate Actions Required
- Upgrade H3 framework to version 2.0.2-rc.17 or later which contains the security patch
- Review all existing mount() configurations to understand potential exposure
- Audit application routes to identify any paths that could be affected by the prefix matching issue
Patch Information
The H3 development team has released version 2.0.2-rc.17 which contains a fix for this vulnerability. The patch modifies the path matching logic to properly validate path segment boundaries, ensuring that middleware mounted on /admin only executes for /admin and /admin/* paths, not for unrelated paths like /administrator. For detailed patch information, refer to the GitHub Security Advisory.
Workarounds
- If immediate patching is not possible, consider adding explicit path validation within mounted middleware to verify the full request path
- Use more specific mount paths with trailing slashes (e.g., /admin/) to reduce the risk of prefix collisions
- Implement additional authorization checks within middleware that do not rely solely on path-based routing
# Upgrade H3 to patched version
npm update h3@2.0.2-rc.17
# Or install specific patched version
npm install h3@2.0.2-rc.17
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

