fastify-websocket vulnerable to uncaught exception via crash on malformed packet
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-248.
Summary
@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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| fastify | fastify-websocket | 5.0.0 to before 5.0.1; 6.0.0 to before 7.1.1; up to 4.3.0 | 5.0.1, 7.1.1 | Patch available | CNA |
| — | @fastify/websocket (npm) | 5.0.0 to before 5.0.1 | 5.0.1 | Patch available | GHSA-4pcg-wr6c-h9cq |
| — | @fastify/websocket (npm) | 6.0.0 to before 7.1.1 | 7.1.1 | Patch available | GHSA-4pcg-wr6c-h9cq |
| — | fastify-websocket (npm) | up to 4.3.0 | — | No fix listed | GHSA-4pcg-wr6c-h9cq |
- fastify-websocket Vendorfastify Affected 5.0.0 to before 5.0.1; 6.0.0 to before 7.1.1; up to 4.3.0 Fixed in 5.0.1, 7.1.1 Patch available CNA
- @fastify/websocket (npm) Vendor— Affected 5.0.0 to before 5.0.1 Fixed in 5.0.1 Patch available GHSA-4pcg-wr6c-h9cq
- @fastify/websocket (npm) Vendor— Affected 6.0.0 to before 7.1.1 Fixed in 7.1.1 Patch available GHSA-4pcg-wr6c-h9cq
- fastify-websocket (npm) Vendor— Affected up to 4.3.0 Fixed in — No fix listed GHSA-4pcg-wr6c-h9cq
Remediation
- Fix · CNA fastify-websocket (fastify) Fixed in 5.0.1, 7.1.1
- Fix · GHSA-4pcg-wr6c-h9cq @fastify/websocket (npm) Fixed in 5.0.1 Advisory →
- Fix · GHSA-4pcg-wr6c-h9cq @fastify/websocket (npm) Fixed in 7.1.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2022-39386
- 2026-10-03 Alias added: GHSA-4pcg-wr6c-h9cq
References
Advisory 2
Other 6
- https://github.com/fastify/fastify-websocket/pull/228
- https://github.com/fastify/fastify-websocket/commit/7e8c41a51c101c3d5ce88caee4f71d9c29eb2863
- https://github.com/fastify/fastify-websocket/commit/c24adeb3efd57a18b2f287c35d029e88b5a47194
- https://github.com/fastify/fastify-websocket
- https://github.com/fastify/fastify-websocket/releases/tag/v5.0.1
- https://github.com/fastify/fastify-websocket/releases/tag/v7.1.1
Sources
- CVE-2022-39386 · CVE Program
- CVE-2022-39386 · NVD
- FIRST EPSS
- GHSA-4pcg-wr6c-h9cq · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences