npm
GHSA-frvp-7c67-39w9
Node.js Adapter for Hono: Path traversal in `serve-static` on Windows via encoded backslash (`%5C`)
- Severity
- Medium 5.9
- Published
- 21 Jul 2026
- Last changed
- 10 Sept 2026
- Added to UpHeron
- 22 Oct 2026
- Fixed in
- 1.19.15, 2.0.5
- Weakness
- Path traversal (CWE-22)
- Attack
- Over the network · Only under certain conditions · No login needed · No user action needed
- Attacker can
- Read data
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N- Sources
- OSV.dev and GitHub
Description
The same as the hono core Path traversal in serve-static on Windows via encoded backslash (%5C).
On Windows hosts, an encoded backslash (%5C) in the request path decodes to \, which the Windows path resolver treats as a separator. serve-static then resolves a single URL segment such as admin\secret.txt into a nested file under the root and serves it, letting an attacker read static files meant to be protected behind prefix-mounted middleware. Directory escape (..) remains blocked.
The router splits paths only on /, so /admin%5Csecret.txt is one segment and middleware on /admin/* does not run. The serve-static guard rejects ./.. and consecutive separators but lets a lone \ through; on Windows the file resolver re-splits it into the protected subtree.
This affects Windows hosts serving static files via the Node, Bun, or Deno adapters that guard a static subtree with prefix-mounted middleware.
Affected software
| Software | Affected versions |
|---|---|
@hono/node-servernpm · osv:npm:@hono/node-server |
|
About @hono/node-server
- Weekly downloads (npm)
- 100,106,943npm, 15 Nov 2026
This is the only vulnerability in @hono/node-server in our list.
References
- GitHub Advisory Database https://github.com/advisories/GHSA-frvp-7c67-39w9