# CVE-2022-39386: fastify-websocket vulnerable to uncaught exception via crash on malformed packet

- Priority: **Prioritise**
- Reason: Severe, CVSS 7.5 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 04-12-2026)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2022-11-08 · Modified: 2025-04-23
- Aliases: GHSA-4pcg-wr6c-h9cq
- Record: https://cvemate.com/vulnerability/CVE-2022-39386 · JSON: https://cvemate.com/vulnerability/CVE-2022-39386/json

## Description

```text
@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.
```

## Signals

- CVSS: 7.5 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- EPSS: 0.884%, percentile 60.46%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- fastify fastify-websocket: ≥ 5.0.0, \< 5.0.1 \| ≥ 6.0.0, \< 7.1.1 \| ≤ 4.3.0
- fastify websocket: ≥ 6.0.0, \< 7.1.1 \| 5.0.0
- Npm fastify-websocket (Npm): ≤ 4.3.0
- @fastify websocket (Npm): ≥ 5.0.0, \< 5.0.1 \| ≥ 6.0.0, \< 7.1.1

## References

- <https://github.com/fastify/fastify-websocket/security/advisories/GHSA-4pcg-wr6c-h9cq>
- <https://nvd.nist.gov/vuln/detail/CVE-2022-39386>
- <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>

---

Data as of 2026-12-05T09:23:18.184Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
