{"id":"CVE-2024-37890","published":"2024-06-17T19:09:02Z","modified":"2024-08-02T03:57:40Z","title":"Denial of service when handling a request with many HTTP headers in ws","vendor":"websockets","product":"ws","tier":"tail","description":{"text":"ws is an open source WebSocket client and server for Node.js. A request with a number of headers exceeding theserver.maxHeadersCount threshold could be used to crash a ws server. The vulnerability was fixed in ws@8.17.1 (e55e510) and backported to ws@7.5.10 (22c2876), ws@6.2.3 (eeb76d3), and ws@5.2.4 (4abd8f6). In vulnerable versions of ws, the issue can be mitigated in the following ways: 1. Reduce the maximum allowed length of the request headers using the --max-http-header-size=size and/or the maxHeaderSize options so that no more headers than the server.maxHeadersCount limit can be sent. 2. Set server.maxHeadersCount to 0 so that no limit is applied.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01357,"percentile":0.72348,"provenance":"source"},"cwes":[{"id":"CWE-476","name":"NULL Pointer Dereference"}],"references":[{"url":"https://github.com/websockets/ws/security/advisories/GHSA-3h5v-q93c-6h6q","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/websockets/ws/issues/2230","tags":["x_refsource_MISC"]},{"url":"https://github.com/websockets/ws/pull/2231","tags":["x_refsource_MISC"]},{"url":"https://github.com/websockets/ws/commit/22c28763234aa75a7e1b76f5c01c181260d7917f","tags":["x_refsource_MISC"]},{"url":"https://github.com/websockets/ws/commit/4abd8f6de4b0b65ef80b3ff081989479ed93377e","tags":["x_refsource_MISC"]},{"url":"https://github.com/websockets/ws/commit/e55e5106f10fcbaac37cfa89759e4cc0d073a52c","tags":["x_refsource_MISC"]},{"url":"https://github.com/websockets/ws/commit/eeb76d313e2a00dd5247ca3597bba7877d064a63","tags":["x_refsource_MISC"]},{"url":"https://nodejs.org/api/http.html#servermaxheaderscount","tags":["x_refsource_MISC"]}],"priority":{"score":19.7,"factors":[{"name":"EPSS percentile","points":14.47},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"websockets","affectedVersions":[{"vendor":"websockets","product":"ws","versions":[">= 2.1.0, < 5.2.4",">= 6.0.0, < 6.2.3",">= 7.0.0, < 7.5.10",">= 8.0.0, < 8.17.1"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2024-06-18T13:25:45.808140Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"ws","vulnerableRanges":[">=2.1.0, <5.2.4",">=6.0.0, <6.2.3",">=7.0.0, <7.5.10",">=8.0.0, <8.17.1"],"patched":["5.2.4","6.2.3","7.5.10","8.17.1"],"from":["GHSA-3h5v-q93c-6h6q"],"provenance":"source"}],"summary":{"text":"The flaw is a NULL pointer dereference in the handling of incoming HTTP request headers in the ws WebSocket client and server library for Node.js. Remote, unauthenticated network access is enough to exploit it: a single request containing more headers than the server.maxHeadersCount threshold can crash a ws server, with no special configuration or user interaction required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:16:16Z"},"euvd":{"id":"EUVD-2024-1899","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-websockets-ws-cve-2021-32640","parents":[{"from":"CVE-2021-32640","to":"CVE-2024-37890","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/websocket-server.js"],"commits":["https://github.com/websockets/ws/commit/00c425ec77993773d823f018f64a5c44e17023ff","https://github.com/websockets/ws/commit/22c28763234aa75a7e1b76f5c01c181260d7917f","https://github.com/websockets/ws/commit/4abd8f6de4b0b65ef80b3ff081989479ed93377e"],"basis":"shared function","functions":["WebSocketServer"]}]}],"packageHistory":[{"cve":"CVE-2016-10518","published":"2018-05-31","fixed":"1.0.1","kev":false},{"cve":"CVE-2016-10542","published":"2018-05-31","fixed":"1.1.1","kev":false},{"cve":"CVE-2021-32640","published":"2021-05-25","fixed":"7.4.6","kev":false},{"cve":"CVE-2024-37890","published":"2024-06-17","fixed":"8.17.1","kev":false},{"cve":"CVE-2026-45736","published":"2026-05-15","fixed":"8.20.1","kev":false,"link":{"from":"CVE-2024-37890","to":"CVE-2026-45736","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:ws","fromFixed":"8.17.1","toFixed":"8.20.1","daysApart":697}]}},{"cve":"CVE-2026-48779","published":"2026-06-16","fixed":"8.21.0","kev":false,"link":{"from":"CVE-2024-37890","to":"CVE-2026-48779","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:ws","fromFixed":"5.2.4","toFixed":"5.2.5","daysApart":729},{"kind":"version-step","provenance":"source","package":"npm:ws","fromFixed":"6.2.3","toFixed":"6.2.4","daysApart":729}]}}],"package":"npm:ws"}}