{"id":"CVE-2022-39386","aliases":["EUVD-2022-7228","GHSA-4pcg-wr6c-h9cq"],"status":"published","title":"fastify-websocket vulnerable to uncaught exception via crash on malformed packet","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.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00864,"percentile":0.58925,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-248"],"published":"2022-11-07T21:13:57Z","modified":"2026-10-28T02:30:44Z","fixes":[{"ecosystem":"npm","package":"@fastify/websocket","fixed_in":["7.1.1","5.0.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"@fastify/websocket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.0.0"},{"fixed":"7.1.1"}]}]},{"source":"ghsa","ecosystem":"npm","package":"fastify-websocket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"4.3.0"}]}]},{"source":"ghsa","ecosystem":"npm","package":"@fastify/websocket","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.0.0"},{"fixed":"5.0.1"}]}]},{"source":"osv","ecosystem":"npm","package":"@fastify/websocket","ranges":[{"type":"SEMVER","events":[{"introduced":"5.0.0"},{"fixed":"5.0.1"}]}]},{"source":"osv","ecosystem":"npm","package":"@fastify/websocket","ranges":[{"type":"SEMVER","events":[{"introduced":"6.0.0"},{"fixed":"7.1.1"}]}]},{"source":"osv","ecosystem":"npm","package":"fastify-websocket","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"4.3.0"}]}]}],"products":[{"vendor":"fastify","product":"fastify-websocket"},{"vendor":"fastify","product":"websocket"}],"references":[{"url":"https://github.com/fastify/fastify-websocket/security/advisories/GHSA-4pcg-wr6c-h9cq","tags":["x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/fastify/fastify-websocket/releases/tag/v5.0.1","tags":["web"]},{"url":"https://github.com/fastify/fastify-websocket/releases/tag/v7.1.1","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39386","tags":["advisory"]},{"url":"https://github.com/fastify/fastify-websocket/pull/228","tags":["web"]},{"url":"https://github.com/fastify/fastify-websocket/commit/7e8c41a51c101c3d5ce88caee4f71d9c29eb2863","tags":["web"]},{"url":"https://github.com/fastify/fastify-websocket/commit/c24adeb3efd57a18b2f287c35d029e88b5a47194","tags":["web"]},{"url":"https://github.com/advisories/GHSA-4pcg-wr6c-h9cq"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/39xxx/CVE-2022-39386.json","tags":["advisory"]},{"url":"https://github.com/fastify/fastify-websocket","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2022-39386","title":"fastify-websocket vulnerable to uncaught exception via crash on malformed packet","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.","status":"published","published":"2022-11-08T00:00:00Z","modified":"2025-04-23T16:39:54.047Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-248"],"updated_at":"2026-11-02T14:34:39.559326Z"}],"euvd":[{"id":"EUVD-2022-7228","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.","status":"published","published":"2022-11-08T00:00:00Z","modified":"2025-04-23T16:39:54Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T20:52:12.313971Z"}],"ghsa":[{"id":"GHSA-4pcg-wr6c-h9cq","title":"fastify/websocket vulnerable to uncaught exception via crash on malformed packet","description":"### Impact\n\nAny application using @fastify/websocket could crash if a specific, malformed packet is sent. \n\nAll versions of fastify-websocket are also impacted. That module is deprecated, so it will not be patched.\n\n### Patches\n\nThis has been patched in v7.1.1 (fastify v4) and v5.0.1 (fastify v3).\n\n### Workarounds\n\nNo known workaround is available. However, it should be possible to attach the error handler manually.\nThe recommended path is upgrading to the patched versions.\n\n## Credits\n\n[marcolanaro](https://github.com/marcolanaro) for finding and patching this vulnerability\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [@fastify/websocket](https://github.com/fastify/fastify-websocket)\n* Email us at [hello@matteocollina.com](mailto:hello@matteocollina.com)\n","status":"published","published":"2022-11-07T21:13:57Z","modified":"2023-03-29T15:52:21Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-248"],"updated_at":"2026-11-02T14:36:48.905887Z"}],"nvd":[{"id":"CVE-2022-39386","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.","status":"published","published":"2022-11-08T22:15:15.953Z","modified":"2026-06-17T04:58:15.743Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-248"],"updated_at":"2026-11-02T14:07:31.914793Z"}],"osv":[{"id":"CVE-2022-39386","title":"fastify-websocket vulnerable to uncaught exception via crash on malformed packet","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.","status":"published","published":"2022-11-08T00:00:00Z","modified":"2026-10-28T02:30:44.891886751Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-248"],"updated_at":"2026-11-02T15:44:26.860704Z"},{"id":"GHSA-4pcg-wr6c-h9cq","title":"fastify/websocket vulnerable to uncaught exception via crash on malformed packet","description":"### Impact\n\nAny application using @fastify/websocket could crash if a specific, malformed packet is sent. \n\nAll versions of fastify-websocket are also impacted. That module is deprecated, so it will not be patched.\n\n### Patches\n\nThis has been patched in v7.1.1 (fastify v4) and v5.0.1 (fastify v3).\n\n### Workarounds\n\nNo known workaround is available. However, it should be possible to attach the error handler manually.\nThe recommended path is upgrading to the patched versions.\n\n## Credits\n\n[marcolanaro](https://github.com/marcolanaro) for finding and patching this vulnerability\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [@fastify/websocket](https://github.com/fastify/fastify-websocket)\n* Email us at [hello@matteocollina.com](mailto:hello@matteocollina.com)\n","status":"published","published":"2022-11-07T21:13:57Z","modified":"2023-11-08T04:10:20.592717Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-248"],"updated_at":"2026-11-02T15:46:37.148947Z"}]}}
