Hono Node.js Adapter path traversal in serve-static on Windows

Severity: low · CVSS 3.1 · Published 2026-07-21

Hono's Node.js Adapter serves static files via a web application framework. On Windows servers, an attacker can exploit how the framework processes URL-encoded backslashes to bypass security middleware and read protected static files—such as configuration or data files meant to be inaccessible. The vulnerability only affects Windows hosts and requires the static file serving to be guarded by prefix-based middleware.

Technologies: @hono/node-server (npm). Vendors: npm.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
Low severity, with a CVSS score of 3.1, published 21 July 2026.
Which products and versions are affected?
@hono/node-server (npm) SEMVER:introduced=2.0.0,fixed=2.0.5.
Is there a fix for This vulnerability?
Yes. @hono/node-server (npm): upgrade to 2.0.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is This vulnerability attacked?
It is attacked over the network, in a software library.
Am I affected?
Check whether you run @hono/node-server (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • @hono/node-server (npm): upgrade to 2.0.5 or later
    npm install @hono/node-server@2.0.5

Technical details

The vulnerability is a path traversal (CWE-22) affecting the serve-static middleware in Hono's Node.js Adapter versions 2.0.0–2.0.4 and all versions before 1.19.15. The root cause is inconsistent path handling between the router and file resolver on Windows: the router splits paths only on forward slashes (/), so a request to /admin%5Csecret.txt is treated as a single segment and bypasses middleware guarding /admin/*. However, the Windows file system resolver interprets %5C (encoded backslash) as a path separator, re-splitting the path and resolving the file into the protected directory tree. An unauthenticated, network-adjacent attacker can send a crafted GET request with encoded backslashes to read arbitrary static files under the configured root directory; directory traversal via .. is blocked. Patches are available in versions 2.0.5 and 1.19.15.

Affected products

  • Hono Node.js Adapter 2.0.0 through 2.0.4, and all versions before 1.19.15

Timeline

  • 2026-07-21: disclosed
  • 2026-07-21: patched: Fixes released in versions 2.0.5 and 1.19.15

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.