CVE-2024-32652: @hono/node server Denial of Service Vulnerability
HIGHCVE-2024-32652 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-755: Improper Handling of Exceptional Conditions) affecting @hono/node server libraries in the npm ecosystem. The issue involves @hono/node-server has denial of service risk when receiving host header that cannot be parsed. Remediation is available by upgrading affected packages to version 1.10.1.
CVE-2024-32652 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2024-32652
To remediate this vulnerability, upgrade all affected @hono/node server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @hono/node-server@1.10.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @hono/node-server
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-32652, inspect your project dependencies using npm:
npm ls @hono/node-server
Analyze the terminal output to locate any version of @hono/node server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.10.1), your application is affected.
Note: The npm ls @hono/node-server command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-755: Improper Handling of Exceptional Conditions, where the product does not handle or incorrectly handles an exceptional condition. In @hono/node server, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-32652 Affected @hono/node server Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@hono/node-server
|
npm |
≥ 1.3.0
< 1.10.1
|
1.10.1
|
References
Frequently Asked Questions
What is CVE-2024-32652?
Which @hono/node server versions are affected?
What version fixes CVE-2024-32652?
Is @hono/node-server affected?
What is the CVSS score of CVE-2024-32652?
What CWE is associated with CVE-2024-32652?
How can I check npm dependencies for CVE-2024-32652?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hgxw-5xg3-69jx",
"modified" : "2024-04-19T21:44:10Z",
"published" : "2024-04-19T19:48:40Z",
"aliases" : [ "CVE-2024-32652" ],
"summary" : "@hono/node-server has Denial of Service risk when receiving Host header that cannot be parsed",
"details" : "### Impact\n\nThe application hangs when receiving a Host header with a value that `@hono/node-server` can't handle well. Invalid values are those that cannot be parsed by the `URL` as a hostname such as an empty string, slashes `/`, and other strings.\n\nFor example, if you have a simple application:\n\n```ts\nimport { serve } from '@hono/node-server'\nimport { Hono } from 'hono'\n\nconst app = new Hono()\n\napp.get('/', (c) => c.text('Hello'))\n\nserve(app)\n```\n\nSending a request with a Host header with an empty value to it:\n\n```\ncurl localhost:3000/ -H \"Host: \"\n```\n\nThe results:\n\n```\nnode:internal/url:775\n this.#updateContext(bindingUrl.parse(input, base));\n ^\n\nTypeError: Invalid URL\n at new URL (node:internal/url:775:36)\n at newRequest (/Users/yusuke/work/h/159/node_modules/@hono/node-server/dist/index.js:137:17)\n at Server.<anonymous> (/Users/yusuke/work/h/159/node_modules/@hono/node-server/dist/index.js:399:17)\n at Server.emit (node:events:514:28)\n at Server.emit (node:domain:488:12)\n at parserOnIncoming (node:_http_server:1143:12)\n at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17) {\n code: 'ERR_INVALID_URL',\n input: 'http:///'\n}\n```\n\n### Patches\n\nThe version `1.10.1` includes the fix for this issue. But, you should use `1.11.0`, which has other fixes related to this issue. https://github.com/honojs/node-server/issues/160 https://github.com/honojs/node-server/issues/161\n\n### Workarounds\n\nNothing. Upgrade your `@hono/node-server`.\n\n### References\n\nhttps://github.com/honojs/node-server/issues/159\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@hono/node-server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.3.0"
}, {
"fixed" : "1.10.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/honojs/node-server/security/advisories/GHSA-hgxw-5xg3-69jx"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-32652"
}, {
"type" : "WEB",
"url" : "https://github.com/honojs/node-server/issues/159"
}, {
"type" : "WEB",
"url" : "https://github.com/honojs/node-server/issues/161"
}, {
"type" : "WEB",
"url" : "https://github.com/honojs/node-server/commit/306d98f02a8671a0a1fb91ac8fe7e281690c05af"
}, {
"type" : "WEB",
"url" : "https://github.com/honojs/node-server/commit/d847e60249fd8183ba0998bc379ba20505643204"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/honojs/node-server"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-755" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-19T19:48:40Z",
"nvd_published_at" : "2024-04-19T19:15:07Z"
}
}