{"id":"GHSA-g78m-2chm-r7qv","summary":"Regular Expression Denial of Service in websocket-extensions (NPM package)","details":"### Impact\n\nThe ReDoS flaw allows an attacker to exhaust the server's capacity to process\nincoming requests by sending a WebSocket handshake request containing a header\nof the following form:\n\n    Sec-WebSocket-Extensions: a; b=\"\\c\\c\\c\\c\\c\\c\\c\\c\\c\\c ...\n\nThat is, a header containing an unclosed string parameter value whose content is\na repeating two-byte sequence of a backslash and some other character. The\nparser takes exponential time to reject this header as invalid, and this will\nblock the processing of any other work on the same thread. Thus if you are\nrunning a single-threaded server, such a request can render your service\ncompletely unavailable.\n\n### Patches\n\nUsers should upgrade to version 0.1.4.\n\n### Workarounds\n\nThere are no known work-arounds other than disabling any public-facing\nWebSocket functionality you are operating.\n\n### References\n\n- https://blog.jcoglan.com/2020/06/02/redos-vulnerability-in-websocket-extensions/","aliases":["CVE-2020-7662","SNYK-JS-WEBSOCKETEXTENSIONS-570623"],"modified":"2026-05-07T05:01:11.192460668Z","published":"2020-06-05T16:16:12Z","database_specific":{"github_reviewed":true,"github_reviewed_at":"2020-06-03T23:10:26Z","nvd_published_at":null,"cwe_ids":["CWE-400"],"severity":"HIGH"},"references":[{"type":"WEB","url":"https://github.com/faye/websocket-extensions-node/security/advisories/GHSA-g78m-2chm-r7qv"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-7662"},{"type":"WEB","url":"https://github.com/faye/websocket-extensions-node/commit/29496f6838bfadfe5a2f85dff33ed0ba33873237"},{"type":"WEB","url":"https://blog.jcoglan.com/2020/06/02/redos-vulnerability-in-websocket-extensions"},{"type":"PACKAGE","url":"https://github.com/faye/websocket-extensions-node"},{"type":"WEB","url":"https://snyk.io/vuln/SNYK-JS-WEBSOCKETEXTENSIONS-570623"}],"affected":[{"package":{"name":"websocket-extensions","ecosystem":"npm","purl":"pkg:npm/websocket-extensions"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.1.4"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/06/GHSA-g78m-2chm-r7qv/GHSA-g78m-2chm-r7qv.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:L/A:H"}]}