CVE-2026-118663: @hono/node-server: `serveStatic` decodes the request path a second time, leading to bypass of middleware on static paths
Medium CVSS 5.3
- OSV id
- GHSA-rmxm-3fg6-px4f
- Also known as
- CVE-2026-118663
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| @hono/node-server npm |
>= 1.19.10, < 2.1.3 | 2.1.3 |
Versions we track that it affects: @hono/node-server 2.1.1
How to fix it
Upgrade @hono/node-server to 2.1.3 or later.
npm install @hono/node-server@2.1.3
# if it is an indirect dependency: npm update @hono/node-server (or npm audit fix)
- If it is an indirect dependency, upgrade the package that depends on it, or force the version with "overrides" (npm), "resolutions" (Yarn) or "pnpm.overrides" (pnpm) in package.json.
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
Not sure whether your project uses an affected version? Check your lockfile below for free.
Details
Summary
serveStatic decodes the request path a second time after Hono has already decoded it for routing. A crafted request can be routed as one path and served as another, so middleware mounted on a static prefix does not run for a file under that prefix.
Details
Hono decodes the request path once before routing. serveStatic decoded it again before resolving the file. With a malformed percent-encoded sequence, the first decode leaves part of the path encoded, the router matches the encoded form, and the second decode resolves the real directory. The file is still resolved inside the configured root; this is not a traversal outside it.
Impact
An unauthenticated attacker may reach static files without the middleware on their prefix running, for example an authentication check. This affects applications that mount middleware on part of the directory served by serveStatic. Applications that serve only public files are not affected.
References
- GHSA-rmxm-3fg6-px4f on OSV.dev
- Web: https://github.com/honojs/node-server/security/advisories/GHSA-rmxm-3fg6-px4f
- Web: https://github.com/honojs/node-server/commit/982179278529d5673812116b042829f27794966f
- Package: https://github.com/honojs/node-server
- Web: https://github.com/honojs/node-server/releases/tag/v2.1.3
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: GitHub Advisory Database via OSV.dev (CC-BY 4.0). Severity comes from the advisory's own rating when it has one, else from its CVSS score.