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

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.92%, higher than 59% of CVEs (2026-11-30)
- Published: 2022-11-07T21:13:57.000Z
- Modified: 2026-06-17T04:58:15.743Z
- Also known as: GHSA-4pcg-wr6c-h9cq
- Weaknesses: CWE-248
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- fastify fastify-websocket: >= 5.0.0, < 5.0.1; >= 6.0.0, < 7.1.1; <= 4.3.0
- @fastify/websocket (npm): from 5.0.0 before 5.0.1; from 6.0.0 before 7.1.1
- fastify-websocket (npm): up to 4.3.0
- fastify websocket: from 6.0.0 before 7.1.1; 5.0.0

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/fastify/fastify-websocket/security/advisories/GHSA-4pcg-wr6c-h9cq> (third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-39386> (advisory)
- <https://github.com/fastify/fastify-websocket/pull/228> (web)
- <https://github.com/fastify/fastify-websocket/commit/7e8c41a51c101c3d5ce88caee4f71d9c29eb2863> (web)
- <https://github.com/fastify/fastify-websocket/commit/c24adeb3efd57a18b2f287c35d029e88b5a47194> (web)
- <https://github.com/fastify/fastify-websocket> (package)
- <https://github.com/fastify/fastify-websocket/releases/tag/v5.0.1> (web)
- <https://github.com/fastify/fastify-websocket/releases/tag/v7.1.1> (web)

## Sources

- CVE List: [CVE-2022-39386](https://www.cve.org/CVERecord?id=CVE-2022-39386), CVE Terms of Use, modified 2025-04-23
- GitHub Advisory Database: [GHSA-4pcg-wr6c-h9cq](https://github.com/advisories/GHSA-4pcg-wr6c-h9cq), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2022-39386](https://nvd.nist.gov/vuln/detail/CVE-2022-39386), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-39386 · Whole record: https://cve.day/CVE-2022-39386.json · Rebuilt by cve.day 2026-11-25T22:58:16.304Z
