CVE-2022-39386 json
fastify-websocket vulnerable to uncaught exception via crash on malformed packet
published 2022-11-07 4 y ago modified 2026-06-17 4 mo ago also GHSA-4pcg-wr6c-h9cq , EUVD-2022-7228
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.9%
- EPSS 0.9% chance of exploitation in 30 days, percentile 58%
- public exploits
- 0
- none known
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.
Patch / fix
- npm @fastify/websocket 5.0.1, 7.1.1
- fastify websocket 7.1.1
CISA SSVC
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 18 mo ago
Exploit prediction
0.86% chance of exploitation in the next 30 days, higher than 58% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | @fastify/websocket | >=5.0.0, <5.0.1 >=6.0.0, <7.1.1 |
5.0.1 7.1.1 |
| npm | fastify-websocket | <=4.3.0 |
no fix listed |
Affected products
- fastify fastify-websocket
Classification
- Weakness
-
- CWE-248 Uncaught Exception
References
-
github.com
/fastify/fastify-websocket/pull/228
web
-
github.com
/fastify/fastify-websocket/commit/7e8c41a51c101c3d5ce88caee4f71d9c29eb2863
web
-
github.com
/fastify/fastify-websocket/commit/c24adeb3efd57a18b2f287c35d029e88b5a47194
web
-
github.com
/fastify/fastify-websocket/security/advisories/GHSA-4pcg-wr6c-h9cq
web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-39386
advisory
-
github.com
/fastify/fastify-websocket
package
-
github.com
/fastify/fastify-websocket/releases/tag/v5.0.1
web
-
github.com
/fastify/fastify-websocket/releases/tag/v7.1.1
web
Sources
- CVE List CVE-2022-39386
- GitHub Advisory GHSA-4pcg-wr6c-h9cq
- NVD CVE-2022-39386
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.