NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
HIGH severity

CVE-2022-39386 — @fastify/websocket

HIGHFix: fastify/fastify-websocket#228

CVE-2022-39386 is a high-severity (CVSS 7.5) CWE-248 vulnerability in @fastify/websocket. A fix is available for @fastify/websocket — see the affected versions and patch details below.

fastify-websocket vulnerable to uncaught exception via crash on malformed packet

Also known asGHSA-4pcg-wr6c-h9cq
Published
Updated
Affected
3 pkgs
Patched
2 / 3
Exploits
None indexed
Exploitation data as of Oct 23, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2022-39386.

EPSS Exploitation Probability

via FIRST.org ↗
0.8%probability of exploitation in next 30 days
Lower Risk+0.02%
Lower risk than most CVEs56th percentile — riskier than 56% of all scored CVEsHighest risk
0.00%0.43%0.86%1.29%0.3%0.8%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

3 pkgs affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

656other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
@fastify/websocketnpm
1.7Mdownloads / week
fastify-websocketnpm
3Kdownloads / week

Description

Impact

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.

Patches

This has been patched in v7.1.1 (fastify v4) and v5.0.1 (fastify v3).

Workarounds

No known workaround is available. However, it should be possible to attach the error handler manually. The recommended path is upgrading to the patched versions.

Credits

marcolanaro for finding and patching this vulnerability

For more information

If you have any questions or comments about this advisory:

Affected Packages

3 total 2 fixed
EcosystemPackageVulnerable rangeFix
📦npm@fastify/websocket≥ 5.0.0&&< 5.0.15.0.1npm install @fastify/websocket@5.0.1
📦npm@fastify/websocket≥ 6.0.0&&< 7.1.17.1.1npm install @fastify/websocket@7.1.1
📦npmfastify-websocketall versionsNo fix

Affected Products

1 product · 2 configurations
Application
websocketfastify
≥ 6.0.0 && < 7.1.1
1 version
5.0.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @fastify/websocket, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update @fastify/websocket to 5.0.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-39386 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Frequently Asked Questions

### Impact 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. ### Patches This has been patched in v7.1.1 (fastify v4) and v5.0.1 (fastify v3). ### Workarounds No known workaround is available. However, it should be possible to attach the error handler manually. The recommended path is upgrading to the patched versions. ## Credits [marcolanaro](https://github.com/marcolanaro) for finding and patching this vulnerability ### For more info
O3 Security · Impact-Aware SCA

Is CVE-2022-39386 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2022-39386: @fastify/websocket — Fixed in 5.0.1