@hono/node-server: `serveStatic` decodes the request path a second time, leading to bypass of middleware on static paths
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 2.1.3
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: yes
- Technical impact: partial
Summary
The @hono/node-server package, which lets Hono web applications run on Node.js, is affected. An unauthenticated attacker can send a specially crafted, malformed encoded request path to bypass middleware (such as access controls) protecting a static file path and read files within the configured static directory.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
@hono/node-server allows running the Hono application on Node.js. From 1.19.10 until 2.1.3, serveStatic decodes a request path a second time after Hono has already decoded it for routing, so a malformed percent-encoded sequence can make route middleware evaluate an encoded path while static file resolution uses a different directory. An unauthenticated attacker can bypass middleware mounted on a protected static prefix and read a file inside the configured static root, although the flaw does not permit traversal outside that root. This issue is fixed in version 2.1.3.
Timeline
- CVE published
- First seen by cve.now
- CISA SSVC assessment
Exploitation: none · Automatable: yes · Technical impact: partial
- Record last updated
Affected versions
- honojs node-server
Version range not reported
- @hono/node-servernpm
From 1.19.10 · fixed in 2.1.3