CVE-2022-39386
JSON

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 packageVersionsReported by
fastify fastify-websocket>= 5.0.0, < 5.0.1, >= 6.0.0, < 7.1.1, <= 4.3.0CVE List
@fastify/websocket (npm)from 5.0.0 before 5.0.1, from 6.0.0 before 7.1.1GitHub Advisory Database
fastify-websocket (npm)up to 4.3.0GitHub Advisory Database
fastify websocketfrom 6.0.0 before 7.1.1, 5.0.0NVD

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-248

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:

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

SourceRecordLicence
CVE ListCVE-2022-39386 changed 2025-04-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-4pcg-wr6c-h9cq changed 2023-11-08CC-BY-4.0
NVDCVE-2022-39386 changed 2026-06-17Public domain