{"id":"GHSA-4pcg-wr6c-h9cq","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","aliases":["CVE-2022-39386"],"modified":"2023-11-08T04:10:20.592717Z","published":"2022-11-07T21:13:57Z","database_specific":{"github_reviewed":true,"github_reviewed_at":"2022-11-07T21:13:57Z","nvd_published_at":"2022-11-08T22:15:00Z","cwe_ids":["CWE-248"],"severity":"HIGH"},"references":[{"type":"WEB","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"}],"affected":[{"package":{"name":"@fastify/websocket","ecosystem":"npm","purl":"pkg:npm/%40fastify/websocket"},"ranges":[{"type":"SEMVER","events":[{"introduced":"5.0.0"},{"fixed":"5.0.1"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/11/GHSA-4pcg-wr6c-h9cq/GHSA-4pcg-wr6c-h9cq.json"}},{"package":{"name":"@fastify/websocket","ecosystem":"npm","purl":"pkg:npm/%40fastify/websocket"},"ranges":[{"type":"SEMVER","events":[{"introduced":"6.0.0"},{"fixed":"7.1.1"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/11/GHSA-4pcg-wr6c-h9cq/GHSA-4pcg-wr6c-h9cq.json"}},{"package":{"name":"fastify-websocket","ecosystem":"npm","purl":"pkg:npm/fastify-websocket"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"4.3.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/11/GHSA-4pcg-wr6c-h9cq/GHSA-4pcg-wr6c-h9cq.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}