@hono/node-server contains Denial of Service risk when receiving Host header that cannot be parsed
cve-program · CVE-2024-32652
PublishedThe adapter @hono/node-server allows you to run your Hono application on Node.js. Prior to 1.10.1, the 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. The version 1.10.1 includes the fix for this issue.
Read the publisher's advisoryeuvd · EUVD-2024-1214
PublishedThe adapter @hono/node-server allows you to run your Hono application on Node.js. Prior to 1.10.1, the 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. The version 1.10.1 includes the fix for this issue.
Read the publisher's advisorynvd · CVE-2024-32652
PublishedThe adapter @hono/node-server allows you to run your Hono application on Node.js. Prior to 1.10.1, the 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. The version 1.10.1 includes the fix for this issue.
Read the publisher's advisoryosv · GHSA-hgxw-5xg3-69jx
Published### Impact The 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. For example, if you have a simple application: ```ts import { serve } from '@hono/node-server' import { Hono } from 'hono' const app = new Hono() app.get('/', (c) => c.text('Hello')) serve(app) ``` Sending a request with a Host header with an empty value to it: ``` curl localhost:3000/ -H "Host: " ``` The results: ``` node:internal/url:775 this.#updateContext(bindingUrl.parse(input, base)); ^ TypeError: Invalid URL at new URL (node:internal/url:775:36) at newRequest (/Users/yusuke/work/h/159/node_modules/@hono/node-server/dist/index.js:137:17) at Server.<anonymous> (/Users/yusuke/work/h/159/node_modules/@hono/node-server/dist/index.js:399:17) at Server.emit (node:events:514:28) at Server.emit (node:domain:488:12) at parserOnIncoming (node:_http_server:1143:12) at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17) { code: 'ERR_INVALID_URL', input: 'http:///' } ``` ### Patches The 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 ### Workarounds Nothing. Upgrade your `@hono/node-server`. ### References https://github.com/honojs/node-server/issues/159
Read the publisher's advisoryAffected versions, risk and source history
Related advisories and sources
Publishers link these advisories through the identifiers shown below. A shared identifier or date alone does not tell you whether your software is affected or whether the advisories describe the same cause.
CVE-2024-32652 · CVE overview and exploitation status
cve-program · CVE-2024-32652
- https://github.com/honojs/node-server/security/advisories/GHSA-hgxw-5xg3-69jx
- https://github.com/honojs/node-server/issues/159
- https://github.com/honojs/node-server/commit/d847e60249fd8183ba0998bc379ba20505643204
euvd · EUVD-2024-1214
- https://github.com/honojs/node-server/security/advisories/GHSA-hgxw-5xg3-69jx
- https://github.com/honojs/node-server/issues/159
- https://github.com/honojs/node-server/commit/d847e60249fd8183ba0998bc379ba20505643204
nvd · CVE-2024-32652
- https://github.com/honojs/node-server/commit/d847e60249fd8183ba0998bc379ba20505643204
- https://github.com/honojs/node-server/issues/159
- https://github.com/honojs/node-server/security/advisories/GHSA-hgxw-5xg3-69jx
osv · GHSA-hgxw-5xg3-69jx
- https://github.com/honojs/node-server/security/advisories/GHSA-hgxw-5xg3-69jx
- https://nvd.nist.gov/vuln/detail/CVE-2024-32652
- https://github.com/honojs/node-server/issues/159
- https://github.com/honojs/node-server/issues/161
- https://github.com/honojs/node-server/commit/306d98f02a8671a0a1fb91ac8fe7e281690c05af
- https://github.com/honojs/node-server/commit/d847e60249fd8183ba0998bc379ba20505643204
- https://github.com/honojs/node-server
Related changes
Linked by CVE identifierNo related changes are available here.