Описание
@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:
Sending a request with a Host header with an empty value to it:
The results:
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/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
Пакеты
@hono/node-server
>= 1.3.0, < 1.10.1
1.10.1
Связанные уязвимости
The 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.