Summary
@hono/node-server: `serveStatic` decodes the request path a second time, leading to bypass of middleware on static paths
Advisory details
Summary
serveStatic decodes the request path a second time after Hono has already decoded it for routing. A crafted request can be routed as one path and served as another, so middleware mounted on a static prefix does not run for a file under that prefix.
Details
Hono decodes the request path once before routing. serveStatic decoded it again before resolving the file. With a malformed percent-encoded sequence, the first decode leaves part of the path encoded, the router matches the encoded form, and the second decode resolves the real directory. The file is still resolved inside the configured root; this is not a traversal outside it.
Impact
An unauthenticated attacker may reach static files without the middleware on their prefix running, for example an authentication check. This affects applications that mount middleware on part of the directory served by serveStatic. Applications that serve only public files are not affected.
References
Related vulnerabilities
All Supply chain →- MEDIUMCVE-2026-118655
Echo has a Static Middleware Double-Unescape Path Traversal
- MEDIUMCVE-2026-111757
Hono: `serveStatic` decodes the request path a second time, leading to bypass of middleware on static paths
- HIGHCVE-2026-69217
http4s: Ember Server Accepts Duplicate Content-Length Headers
- MEDIUMCVE-2026-69212
http4s: FollowRedirect exposes sensitive headers on same-authority HTTPS-to-HTTP redirects
- MEDIUMCVE-2026-69211
http4s: Set-Cookie rendering does not escape attribute delimiters
- HIGHCVE-2026-69210
http4s WebSocket decoder accepts negative length, causing infinite decode loop