Medium · 5.3 Node.js & npm GHSA-rmxm-3fg6-px4f CVE-2026-118663
@hono/node-server: Double Path Decoding Allows Middleware Bypass on Static File Routes
A flaw in @hono/node-server's serveStatic handler causes request paths to be decoded twice, letting an unauthenticated attacker bypass middleware protecting static file routes and read files within the configured static root. The issue is fixed in version 2.1.3.
By PatchBriefing · ·
Produced automatically from official sources with the help of AI. How we work →
AI summary
A vulnerability has been identified in @hono/node-server, the Node.js runtime adapter for the Hono web framework. The issue affects how the serveStatic function processes request paths, and it can allow an attacker to bypass access-control middleware that is meant to protect static file routes. The vulnerability is tracked as CVE-2026-118663 and GHSA-rmxm-3fg6-px4f, and is fixed in version 2.1.3.
What happened
A vulnerability was disclosed in @hono/node-server affecting the serveStatic function used to serve static files. Due to the path being decoded twice, middleware intended to guard a static file prefix can be bypassed by an unauthenticated attacker, allowing access to a file inside the configured static root that should otherwise have been protected. The advisory notes that this does not allow traversal outside of the configured static root directory.
Technical cause
Hono's routing layer already decodes the percent-encoded request path to determine which route and middleware apply. The serveStatic handler in @hono/node-server then decodes the path a second time before resolving the file to serve. Because of this double decoding, a specially crafted, malformed percent-encoded sequence can cause the middleware to evaluate one (encoded) version of the path while the static file resolution logic operates on a different, fully-decoded version. This mismatch is classified as CWE-174, Double Decoding of the Same Data, and allows the two layers to disagree on which resource is actually being accessed.
Why it matters
Any application that relies on middleware to restrict access to a static file prefix served through serveStatic in @hono/node-server is potentially exposed. Because the attack requires no authentication and no user interaction, an attacker can exploit the mismatch directly over the network to read files within the static root that were intended to be protected by access-control middleware. The impact is limited to confidentiality of files already placed under the static root; the advisory states there is no traversal outside that root.
Affected versions
@hono/node-server versions from 1.19.10 up to (but not including) 2.1.3 are affected. Version 2.1.3 contains the fix.
Fixes and mitigation
The vendor has released version 2.1.3 of @hono/node-server, which addresses the double-decoding issue in serveStatic. Applications using an affected version should upgrade to 2.1.3.
Recommended action
Update @hono/node-server to version 2.1.3 as soon as possible, particularly if your application uses serveStatic together with middleware to restrict access to specific static file paths. After upgrading, verify that access-control middleware applied to static routes behaves as expected for percent-encoded request paths.
PatchBriefing score
5.3 / 10 · Medium
Official CVSS: 5.3
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
EPSS 0.0046 (32 percentile)
Why this score
The PatchBriefing score equals the official CVSS score; when this article covers several vulnerabilities, the highest one. Signals such as known exploitation and EPSS are listed separately and do not change the score.
Affected versions
- @hono/node-server >= 1.19.10, < 2.1.3
- vulnerable
- @hono/node-server ≥ 1.19.10 < 2.1.3
- vulnerable
- ≥ 2.1.3
- patched
Reported fixes
The vendor has released version 2.1.3 of @hono/node-server, which addresses the double-decoding issue in serveStatic. Applications using an affected version should upgrade to 2.1.3.
How this was built
3 source records were collected, matched and used to prepare the report above.
-
GitHub Advisory Database database
-
NVD (NIST) database
-
OSV.dev database
Revision history
- Published
- Generated
- Published
- Generated
- Published
- Generated