@hono/node-server is vulnerable to Path Traversal
59
Medium Risk
The serveStatic middleware in @hono/node-server can serve protected static files on Windows when a request path contains a URL-encoded backslash. The Hono router treats a path like /admin%5Csecret.txt as a single segment, so prefix-mounted authorization middleware on /admin/* does not run. Before the fix, serveStatic allowed a decoded lone backslash through its path guard while Windows path resolution split it into a nested file under the static root. The fix extends path validation to reject backslash-based traversal patterns.
You are affected if you are using a version that falls within the vulnerable range and your application runs on Windows with serveStatic together with prefix-mounted middleware for access control.
@hono/node-server is vulnerable to Path Traversal in versions 0.2.0 - 2.0.4.
Upgrade the @hono/node-server library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

SOC 2Compliant
ISO 27001Compliant