
Cloud Vulnerability DB
A community-led vulnerabilities database
getPath() assumed that the URL of a request always has a scheme and a host. On Bun, the URL of a request without a usable Host header has only the path. For such a request, Hono dropped the first segment of the path before routing. As a result, a request could reach a route that a reverse proxy in front of the application blocks by path.
Hono takes the path of a request from its URL string. The code looked for the start of the path after the scheme and the host, so it needed an absolute URL.
Bun passes the request target as it is when it cannot build the host part. This happens for an HTTP/1.0 request without a Host header and for a request with an empty Host header. The URL then starts with the path, and Hono started the path at the second slash.
Hono itself stays consistent, because the router and the middleware use the same value. The difference is between Hono and a component in front of it that saw the original path.
This issue arises when the application runs on Bun, and a reverse proxy that restricts access by path passes a request without a usable Host header to it. Node.js with @hono/node-server, Deno, and Cloudflare Workers always give an absolute URL and are not affected.
An unauthenticated client may make Hono route a request with a different path from the one the reverse proxy checked. This may lead to:
Source: NVD
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."