GHSA-8WCC-WQXR-28QP
WebSocket upgrade listener leaves non-WebSocket `Upgrade` requests open, leading to socket exhaustion
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-8WCC-WQXR-28QP divulgada · CVSS 5.3 (GitHub) | |
| Divulgación | Modificada | Última actualización del registro | |
| Remediación | Parche 2.1.10 | @hono/node-server · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
When the `websocket` option is enabled, `@hono/node-server` handles every HTTP `Upgrade` request on the server. A request whose `Upgrade` header names a protocol other than `websocket` is ignored: no response is written and the socket is not closed, so the connection stays open until the client closes it.
Details
Node.js hands the socket of an `Upgrade` request to the `upgrade` listener instead of the normal request handler. The listener installed by the `websocket` option only handles `websocket` and returned for any other value without answering. Such a connection is not covered by the header or keep-alive timeouts of the server, so it stays open for as long as the client keeps it. The request never reaches the Hono application, so no route or middleware runs. Ordinary clients that try an HTTP/2 upgrade over plain HTTP are affected in the same way and hang.
The fix answers such a request with `400 Bad Request` and closes the socket when no other `upgrade` listener is registered on the server. Applications that register their own `upgrade` listener keep handling these requests themselves.
Impact
An unauthenticated client can hold many connections open with one request each. Every connection consumes a socket and a file descriptor of the server process, so repeated requests can stop the server from accepting new connections. The impact is limited to availability.
This affects applications that enable the `websocket` option of `@hono/node-server` and receive `Upgrade` requests from untrusted clients, directly or through a proxy that forwards non-WebSocket upgrades.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npm@hono/node-server |
Corregida | 2.1.10 | 0 d | 2.1.11 no afectada |
2.1.10Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/honojs/node-server/security/advisories/GHSA-8wcc-wqxr-28qpLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
