{"id":"CVE-2020-7662","aliases":["CVE-2020-7662","GHSA-g78m-2chm-r7qv","SNYK-JS-WEBSOCKETEXTENSIONS-570623"],"related":[],"kind":"vulnerability","state":"published","title":"Regular Expression Denial of Service in websocket-extensions (NPM package)","summary":"websocket-extensions npm module prior to 0.1.4 allows Denial of Service (DoS) via Regex Backtracking. The extension parser may take quadratic time when parsing a header containing an unclosed string parameter value whose content is a repeating two-byte sequence of a backslash and some other character. This could be abused by an attacker to conduct Regex Denial Of Service (ReDoS) on a single-threaded server by providing a malicious payload with the Sec-WebSocket-Extensions header.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"websocket-extensions npm module prior to 0.1.4 allows Denial of Service (DoS) via Regex Backtracking. The extension parser may take quadratic time when parsing a header containing an unclosed string parameter value whose content is a repeating two-byte sequence of a backslash and some other character. This could be abused by an attacker to conduct Regex Denial Of Service (ReDoS) on a single-threaded server by providing a malicious payload with the Sec-WebSocket-Extensions header.","source":"cvelist"},{"lang":"en","text":"### 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/","format":"markdown","source":"ghsa"},{"lang":"es","text":"El módulo de npm websocket-extensions versiones anteriores a 0.1.4 permite una denegación de servicio (DoS) por medio de Regex Backtracking. El analizador de extensiones puede tardar un tiempo cuadrático cuando analiza un encabezado que contiene un valor de parámetro de cadena no cerrado cuyo contenido es una secuencia repetitiva de dos bytes de una barra diagonal inversa y algún otro carácter. Esto podría ser abusado por un atacante para llevar a cabo una Denegación de Servicio de Regex (ReDoS) en un servidor de un subproceso único al proporcionar una carga útil maliciosa con el encabezado Sec-WebSocket-Extensions","source":"nvd"}],"published":"2020-06-02T18:28:46.000Z","modified":"2026-07-08T06:50:02.226Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H","score":8.2,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","score":5,"rating":"MEDIUM"}],"cwes":["CWE-400"],"affected":[{"ranges":[{"version":"All versions prior to 0.1.4","status":"affected"}],"product":"websocket-extensions (npm)","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.1.4"}],"ecosystem":"npm","package":"websocket-extensions","purl":"pkg:npm/websocket-extensions","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.1.4"}],"vendor":"websocket-extensions_project","product":"websocket-extensions","cpe":"cpe:2.3:a:websocket-extensions_project:websocket-extensions:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://blog.jcoglan.com/2020/06/02/redos-vulnerability-in-websocket-extensions","tags":["exploit","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/faye/websocket-extensions-node/security/advisories/GHSA-g78m-2chm-r7qv","tags":["exploit","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/faye/websocket-extensions-node/commit/29496f6838bfadfe5a2f85dff33ed0ba33873237","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://snyk.io/vuln/SNYK-JS-WEBSOCKETEXTENSIONS-570623","tags":["exploit","technical-description","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-7662","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/faye/websocket-extensions-node","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"snyk","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-7662","url":"https://www.cve.org/CVERecord?id=CVE-2020-7662","licence":"CVE Terms of Use","modified":"2024-08-04T09:33:20.006Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-g78m-2chm-r7qv","url":"https://github.com/advisories/GHSA-g78m-2chm-r7qv","licence":"CC-BY-4.0","modified":"2026-07-08T06:50:02.226Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-7662","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-7662","licence":"Public domain","modified":"2026-06-17T03:25:13.273Z"}],"updatedAt":"2026-11-25T22:57:52.647Z","epss":{"score":0.03088,"percentile":0.88056,"date":"2026-12-01T12:00:22.000Z"}}