CVE-2026-137483 in Hono
Summary
by MITRE • 11/26/2026
Hono from 4.13.11 before 4.13.18 contains a middleware bypass vulnerability in serveStatic that allows unauthenticated attackers to skip prefix middleware by exploiting a second path decode when allowPercentInPath is enabled. Attackers can send malformed percent-encoded sequences so the router matches an encoded path while serveStatic serves the real file, bypassing authentication checks.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 11/26/2026
The vulnerability identified in Hono versions prior to 4.13.18 represents a critical middleware bypass flaw within the serveStatic functionality, specifically triggered when the allowPercentInPath configuration option is enabled. This security issue stems from an inconsistent handling of URL-encoded characters during request processing, allowing attackers to manipulate path resolution mechanisms to evade authentication and authorization controls. The core technical defect lies in the application performing multiple rounds of path decoding without properly validating or normalizing the resulting paths against access control policies established by preceding middleware layers.
In a typical web server architecture using Hono, static file serving is often protected by prefix middleware that enforces security checks such as authentication tokens, rate limiting, or IP whitelisting before allowing access to sensitive resources. However, when an attacker submits a request containing malformed percent-encoded sequences, the router may interpret one version of the path for routing decisions while the serveStatic module interprets a different, decoded version when locating and serving files. This discrepancy arises because the framework applies a second decoding step during static file resolution that is not mirrored in the initial middleware execution context. Consequently, an encoded payload designed to bypass prefix restrictions can result in the router matching a permitted route while simultaneously allowing the server to serve restricted content from outside the intended directory structure or without requiring valid credentials.
The operational impact of this vulnerability is severe for applications relying on Hono’s static file serving capabilities behind authentication gateways. Unauthenticated attackers can exploit this logic error to access sensitive files, configuration data, source code, or other protected assets that were previously inaccessible due to middleware-based security controls. This bypass effectively neutralizes the protective measures implemented by developers who assumed that prefix middleware would consistently apply across all request processing stages regardless of path encoding variations. The ability to skip authentication checks undermines the integrity of access control systems and can lead to unauthorized data exposure, further exploitation through information disclosure, or potential remote code execution if sensitive files contain executable scripts or configuration details with high privileges.
To mitigate this risk, organizations running Hono versions between 4.13.11 and 4.13.17 must upgrade immediately to version 4.13.18 or later where the path decoding logic has been corrected to ensure consistency across middleware execution and static file serving. For environments unable to patch promptly, administrators should disable the allowPercentInPath configuration option if it is not strictly required for application functionality, thereby preventing the specific encoding manipulation vector exploited by this vulnerability. Additionally, implementing strict input validation on all incoming requests and ensuring that security middleware operates at a level that processes fully decoded paths before any routing or file serving decisions are made can provide supplementary defense in depth. Regular auditing of static asset access patterns and monitoring for anomalous request sequences containing unusual percent-encoding structures will also aid in detecting potential exploitation attempts.
This vulnerability aligns with CWE-20 Improper Input Validation, as the application fails to adequately validate and normalize user-supplied input before processing it through security controls. It is further categorized under ATT&CK technique T1592.004 Client Side Discovery of Web Hosts, specifically involving client-side path manipulation techniques that exploit server-side parsing inconsistencies. The incident underscores the importance of consistent request handling pipelines in web frameworks and highlights how subtle differences in encoding interpretation can lead to significant security failures in middleware-based architectures.