Descrizione
@fastify/http-proxy is a Fastify plugin that proxies HTTP and WebSocket traffic to an upstream server. In versions from 9.0.0 up to but not including 11.6.10, when the plugin is registered with websocket support enabled, it takes every upgraded socket and dispatches the request through the Fastify router before the WebSocket library takes ownership of the socket. Node.js removes its own error listener from the socket before emitting the upgrade event, and the plugin does not attach one of its own during routing, so a socket error such as a client connection reset that arrives before the WebSocket library takes over is unhandled and terminates the Node.js process. The error window is open whenever anything asynchronous runs between dispatch and the route handler, such as an async hook on the proxied route or any unrelated async route in the application. A single unauthenticated upgrade request followed by a connection reset is enough to crash the server, and it can be repeated to keep the process down. The issue is fixed in @fastify/http-proxy 11.6.10, and users should upgrade to 11.6.10 or later.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.5, EPSS 0.4% (percentile 31).
Versioni da aggiornare
- @fastify/http-proxy @fastify/http-proxy: vulnerabili le versioni dalla
9.0.0precedenti alla11.6.10→ aggiornare alla11.6.10o successiva. - @fastify/http-proxy @fastify/http-proxy: versione corretta
11.6.10(o successiva).
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Ridurre l'esposizione del componente vulnerabile (segmentazione, accesso solo da reti fidate) finché la patch non è applicata.
Verifica
- Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
- Confrontare la versione installata con quelle indicate sopra.
- Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
- Ripetere la scansione per confermare la correzione.
Configurazioni interessate
| Vendor | Prodotto | Versioni vulnerabili | Corretta in |
|---|---|---|---|
| @fastify/http-proxy | @fastify/http-proxy | ≥ 9.0.0 < 11.6.10 | 11.6.10 |
| @fastify/http-proxy | @fastify/http-proxy | — | 11.6.10 |