{"id":"CVE-2022-39386","aliases":["GHSA-4pcg-wr6c-h9cq"],"url":"https://o3.security/vulnerability/CVE-2022-39386","summary":"fastify-websocket vulnerable to uncaught exception via crash on malformed packet","details":"### 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","published":"2022-11-08T00:00:00Z","modified":"2026-08-12T03:51:32.387519480Z","cvss":{"score":7.5,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"@fastify/websocket","fixedVersion":"5.0.1"},{"ecosystem":"npm","name":"@fastify/websocket","fixedVersion":"7.1.1"},{"ecosystem":"npm","name":"fastify-websocket","fixedVersion":null}],"fix":{"url":"https://github.com/fastify/fastify-websocket/pull/228","label":"fastify/fastify-websocket#228"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/39xxx/CVE-2022-39386.json"},{"type":"ADVISORY","url":"https://github.com/fastify/fastify-websocket/security/advisories/GHSA-4pcg-wr6c-h9cq"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39386"},{"type":"WEB","url":"https://github.com/fastify/fastify-websocket/pull/228"},{"type":"WEB","url":"https://github.com/fastify/fastify-websocket/commit/7e8c41a51c101c3d5ce88caee4f71d9c29eb2863"},{"type":"WEB","url":"https://github.com/fastify/fastify-websocket/commit/c24adeb3efd57a18b2f287c35d029e88b5a47194"},{"type":"PACKAGE","url":"https://github.com/fastify/fastify-websocket"},{"type":"WEB","url":"https://github.com/fastify/fastify-websocket/releases/tag/v5.0.1"},{"type":"WEB","url":"https://github.com/fastify/fastify-websocket/releases/tag/v7.1.1"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:32.387519480Z"}}