CVE-2024-37890
Denial of service when handling a request with many HTTP headers in ws
Check your servers for CVE-2024-37890
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-37890 affects ws, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
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.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality none, integrity none, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 1.36%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 72.4% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 18 Jun 2024):
- Exploitation
- poc: a proof of concept is public
- Automatable
- yes: an attacker can automate the attack across many targets
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-476 NULL Pointer Dereference
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| ws |
affected >= 2.1.0, < 5.2.4 affected >= 6.0.0, < 6.2.3 affected >= 7.0.0, < 7.5.10 affected >= 8.0.0, < 8.17.1
|
Is my server affected?
Find the installed version of ws and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i ws
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2024-37890 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2024-37890RHEL, Rocky, Alma, Fedora
rpm -q ws
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2024-37890Alpine
apk list --installed | grep -i wsWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2024-37890
trivy image --scanners vuln IMAGE | grep CVE-2024-37890
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
Other references
- https://github.com/websockets/ws/issues/2230 github.com
- https://github.com/websockets/ws/pull/2231 github.com
- https://github.com/websockets/ws/commit/22c28763234aa75a7e1b76f5c01c181260d7917f github.com
- https://github.com/websockets/ws/commit/4abd8f6de4b0b65ef80b3ff081989479ed93377e github.com
- https://github.com/websockets/ws/commit/e55e5106f10fcbaac37cfa89759e4cc0d073a52c github.com
- https://github.com/websockets/ws/commit/eeb76d313e2a00dd5247ca3597bba7877d064a63 github.com
- https://nodejs.org/api/http.html#servermaxheaderscount nodejs.org
Source: the record CVE-2024-37890 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse