Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-111757 Overview
CVE-2026-111757 is a path handling vulnerability in Hono, a web application framework for JavaScript runtimes. The serveStatic middleware decodes a routed request path a second time before performing filesystem lookup. This double-decode behavior allows malformed percent-encoded paths to bypass upstream routing middleware that protects a static prefix. An attacker can craft a request that survives the first routing interpretation as an unprotected path, then resolves to a protected static file during the second decode. The flaw affects Hono versions 4.12.4 through 4.13.10 and is fixed in 4.13.11. The weakness is tracked under [CWE-174: Double Decoding of the Same Data].
Critical Impact
Unauthorized disclosure of static files that upstream middleware was intended to protect. The issue does not permit traversal outside the configured static root.
Affected Products
- Hono framework versions 4.12.4 through 4.13.10
- Applications using the serveStatic middleware component
- Deployments where upstream middleware protects a static prefix
Discovery Timeline
- 2026-10-19 - CVE-2026-111757 published to NVD
- 2026-10-20 - Last updated in NVD database
Technical Details for CVE-2026-111757
Vulnerability Analysis
The vulnerability arises from inconsistent percent-decoding between Hono's routing layer and the serveStatic middleware. When a request arrives, upstream routing middleware interprets the raw path to decide whether a protected prefix matches. The serveStatic handler then decodes the already-routed path a second time before performing the filesystem lookup. Malformed percent-encoded sequences that fail or pass through the first interpretation can resolve to a different path after the second decode. This divergence enables attackers to request a path that upstream middleware classifies as unprotected but serveStatic resolves to a file within the protected prefix. The outcome is confidentiality loss limited to files inside the configured static root.
Root Cause
The root cause is a double-decoding defect in src/middleware/serve-static/index.ts. The middleware applies percent-decoding to a request path that has already been processed by Hono's router. Because the router and serveStatic do not share a single canonical representation of the path, access control decisions made upstream do not bind to the final resolved path.
Attack Vector
Exploitation requires network access to an application that uses serveStatic behind upstream middleware guarding a static prefix. The attacker submits a crafted URL containing malformed percent-encoding targeting a file under the protected prefix. No authentication or user interaction is required. The attack is limited to reading files within the static root; it does not enable directory traversal, write access, or code execution.
// Patch excerpt from src/middleware/serve-static/index.ts
root?: string
path?: string
precompressed?: boolean
+ /** Allow percent signs in the routed request path. Defaults to false. */
+ allowPercentInPath?: boolean
mimes?: Record<string, string>
rewriteRequestPath?: (path: string) => string
onFound?: (path: string, c: Context<E>) => void | Promise<void>
Source: Hono security patch commit 8b05c77. The fix introduces an allowPercentInPath option that defaults to false, rejecting routed paths containing percent signs unless explicitly opted in.
Detection Methods for CVE-2026-111757
Indicators of Compromise
- Access log entries containing malformed percent-encoding (for example % not followed by two valid hexadecimal characters) in URL paths handled by serveStatic.
- Successful 200 responses for static assets whose paths include encoded characters that should have been rejected by upstream middleware.
- Requests targeting files beneath a prefix that upstream middleware is configured to protect.
Detection Strategies
- Compare the request path observed by routing middleware with the file path resolved by serveStatic and alert on divergence.
- Inspect HTTP access logs for percent sequences such as %2, %%, or trailing % characters followed by non-hex bytes.
- Correlate upstream authorization decisions with filesystem read events to identify bypasses of protected prefixes.
Monitoring Recommendations
- Enable verbose logging in serveStatic to capture the pre-decode and post-decode path for each request.
- Audit the installed Hono version across Node.js, Deno, Bun, and Cloudflare Workers deployments using lockfile scans.
- Track egress of static files from protected prefixes and alert on unexpected consumers.
How to Mitigate CVE-2026-111757
Immediate Actions Required
- Upgrade Hono to version 4.13.11 or later across all affected JavaScript runtime deployments.
- Inventory applications using serveStatic behind upstream authorization middleware and prioritize them for patching.
- Review access logs since the deployment of versions in the 4.12.4 to 4.13.10 range for suspicious percent-encoded requests.
Patch Information
The fix is published in Hono 4.13.11. Technical details are available in the Hono security patch commit 8b05c77 and the GitHub Security Advisory GHSA-5r4p-p66f-jhc7. The patch adds an allowPercentInPath option, defaulting to false, which rejects routed request paths containing percent signs.
Workarounds
- Place a reverse proxy or web application firewall in front of the application to normalize and reject malformed percent-encoded paths before they reach Hono.
- Serve protected static assets from an origin that enforces authorization at the filesystem layer rather than relying on prefix-matching middleware.
- If upgrading immediately is not feasible, remove serveStatic from routes that overlap with protected prefixes and serve those assets through an authenticated handler.
# Upgrade Hono to the patched release
npm install hono@4.13.11
# Verify the installed version
npm ls hono
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

