@hono/node-server has Denial of Service risk when receiving Host header that cannot be parsed
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:
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
Czego dotyczy
Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.
| Platforma | Paczka | Podatne wersje | Poprawka w wersji |
|---|---|---|---|
| Paczka npm | @hono/node-server | >= 1.3.0, < 1.10.1 | 1.10.1 |
Odnośniki
- 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
- Wektor CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H- Słabość (CWE)
CWE-755- Platforma
- npm
- Paczka
@hono/node-server- Ujawniono
- 19.04.2024
- Aktualizacja
- 11.10.2026 10:22
Źródła i licencje
OSV / GitHub Advisory Database - GHSA-hgxw-5xg3-69jx - CC BY 4.0
Historia podatności: @hono/node-server
Wszystkie opisane podatności tej paczki (Paczka npm), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.
- Wszystkich wpisów
- 6
- Pierwsza → ostatnia
- 01.2024 07.2026
- Bez poprawki
- 0
- Wykorzystywana w atakach
- 0
Rozkład istotności
- Wysoka 2
- Średnia 4
Ujawnienia w latach
- 2024: 2
- 2025: 0
- 2026: 4
-
@hono/node-server has Denial of Service risk when receiving Host header that cannot be parsed ten wpis
Dowiedz się, które podatności dotyczą Twojej aplikacji
Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.