CVE-2022-39386
HIGH 7.5CVSS 3.1fastify/websocket vulnerable to uncaught exception via crash on malformed packet
@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.
- Published
- 8 Nov 2022
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-248
- Also known as
- GHSA-4pcg-wr6c-h9cq
- Sources
- NVDJSONOSV GHSA-4pcg-wr6c-h9cqJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | fastify | websocketcpe:2.3:a:fastify:websocket:*:*:*:*:*:node.js:*:* |
>= 6.0.0, < 7.1.1 | 7.1.1 |
| NVD | fastify | websocketcpe:2.3:a:fastify:websocket:5.0.0:*:*:*:*:node.js:*:* |
= 5.0.0 | |
| OSV | npm | @fastify/websocket | >= 5.0.0, < 5.0.1 | 5.0.1 |
| OSV | npm | @fastify/websocket | >= 6.0.0, < 7.1.1 | 7.1.1 |
| OSV | npm | fastify-websocket | <= 4.3.0 |
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
History
- 25 Nov 2026 20:35 UTC · NVD: first stored (published 8 Nov 2022)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 7 Nov 2022)