7.5high
fastify-websocket vulnerable to uncaught exception via crash on malformed packet
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.92% (higher than 59% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-4pcg-wr6c-h9cq
Description
@fastify/websocket provides WebSocket support for Fastify. Any application using @fastify/websocket could crash if a specific, malformed packet is sent. All versions of fastify-websocket are also impacted. That module is deprecated, so it will not be patched. This has been patched in version 7.1.1 (fastify v4) and version 5.0.1 (fastify v3). There are currently no known workarounds. However, it should be possible to attach the error handler manually. The recommended path is upgrading to the patched versions.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| fastify fastify-websocket | >= 5.0.0, < 5.0.1, >= 6.0.0, < 7.1.1, <= 4.3.0 | CVE List |
| @fastify/websocket (npm) | from 5.0.0 before 5.0.1, from 6.0.0 before 7.1.1 | GitHub Advisory Database |
| fastify-websocket (npm) | up to 4.3.0 | GitHub Advisory Database |
| fastify websocket | from 6.0.0 before 7.1.1, 5.0.0 | NVD |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
@fastify/websocket provides WebSocket support for Fastify. Any application using @fastify/websocket could crash if a specific, malformed packet is sent. All versions of fastify-websocket are also impacted. That module is deprecated, so it will not be patched. This has been patched in version 7.1.1 (fastify v4) and version 5.0.1 (fastify v3). There are currently no known workarounds. However, it should be possible to attach the error handler manually. The recommended path is upgrading to the patched versions.
GitHub Advisory Database
Impact
Any application using @fastify/websocket could crash if a specific, malformed packet is sent.
All versions of fastify-websocket are also impacted. That module is deprecated, so it will not be patched.
Patches
This has been patched in v7.1.1 (fastify v4) and v5.0.1 (fastify v3).
Workarounds
No known workaround is available. However, it should be possible to attach the error handler manually. The recommended path is upgrading to the patched versions.
Credits
marcolanaro for finding and patching this vulnerability
For more information
If you have any questions or comments about this advisory:
- Open an issue in @fastify/websocket
- Email us at hello@matteocollina.com
NVD (es)
@fastify/websocket proporciona soporte WebSocket para Fastify. Cualquier aplicación que utilice @fastify/websocket podría fallar si se envía un paquete específico con formato incorrecto. Todas las versiones de fastify-websocket también se ven afectadas. Ese módulo está en desuso, por lo que no será parcheado. Esto se ha parcheado en la versión 7.1.1 (fastify v4) y la versión 5.0.1 (fastify v3). Actualmente no se conocen workarounds. Sin embargo, debería ser posible adjuntar el controlador de errores manualmente. La ruta recomendada es actualizar a las versiones parcheadas.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-39386 changed 2025-04-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-4pcg-wr6c-h9cq changed 2023-11-08 | CC-BY-4.0 |
| NVD | CVE-2022-39386 changed 2026-06-17 | Public domain |