Medium severity · published Jan 22, 2024
CVE-2024-23340
@hono/node-server can't handle "double dots" in URL
5.3
CVSS
0.7%
EPSS
No
On KEV
Description
@hono/node-server is an adapter that allows users to run Hono applications on Node.js. Since v1.3.0, @hono/node-server has used its own Request object with `url` behavior that is unexpected. In the standard API, if the URL contains `..`, here called "double dots", the URL string returned by Request will be in the resolved path. However, the `url` in @hono/node-server's Request as does not resolve double dots, so `http://localhost/static/.. /foo.txt` is returned. This causes vulnerabilities when using `serveStatic`. Modern web browsers and a latest `curl` command resolve double dots on the client side, so this issue doesn't affect those using either of those tools. However, problems may occur if accessed by a client that does not resolve them. Version 1.4.1 includes the change to fix this issue. As a workaround, don't use `serveStatic`.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
Low
Integrity
None
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.7% · higher than 54% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
NO
node-server · honojs
>= 1.3.0, < 1.4.1 · source: vendor, NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-23340
CVE.org
https://www.cve.org/CVERecord?id=CVE-2024-23340
Product
https://github.com/honojs/node-server/blob/8cea466fd05e6d2e99c28011fc0e2c2d3f3397c9/src/request.ts#L43-L45
Patch
https://github.com/honojs/node-server/commit/dd9b9a9b23e3896403c90a740e7f1f0892feb402
Exploit
https://github.com/honojs/node-server/security/advisories/GHSA-rjq5-w47x-x359
More from node-server
7.5
CVE-2026-29087
@hono/node-server: Authorization bypass for protected static paths via encoded slashes in Serve Static Middleware
7.5
CVE-2024-32652
@hono/node-server contains Denial of Service risk when receiving Host header that cannot be parsed
5.3
CVE-2026-118663
@hono/node-server: `serveStatic` decodes the request path a second time, leading to bypass of middleware on static paths
5.3
CVE-2026-73565
@hono/node-server: Unauthenticated memory-leak DoS via aborted WebSocket handshake
5.3
CVE-2026-39406
@hono/node-server has a middleware bypass via repeated slashes in serveStatic
