GHSA-QHM2-7MPR-GHJP
Unhandled `ECONNRESET` on a non-WebSocket `Upgrade` request crashes the process when WebSocket support is enabled
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-QHM2-7MPR-GHJP divulgada · CVSS 5.3 (GitHub) | |
| Remediación | Parche 2.1.11 | @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` receives every HTTP `Upgrade` request on the server. For a request whose `Upgrade` header names a protocol other than `websocket`, the socket had no error listener. If the client resets the TCP connection at that point, the resulting error is emitted as an unhandled `'error'` event and the process terminates.
Details
The fix for GHSA-qv5m-9pm6-hqp3 attaches error and close listeners to the socket of a WebSocket upgrade request before the application runs. The branch that handles other `Upgrade` values returned before those listeners were attached. In version 2.1.10 that branch answers with `400 Bad Request`, but a reset that arrives before the response is written still reaches the socket without an error listener.
The fix attaches the error listener as soon as the socket is handed to the upgrade listener, before any check or write.
Impact
An unauthenticated client can terminate the server process with a single connection by sending an `Upgrade` request for a protocol other than `websocket` and resetting the connection.
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.11 | 0 d | 2.1.11 no afectada |
2.1.11Arsenal 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-qhm2-7mpr-ghjpLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
