CVE-2025-22150
Undici Uses Insufficiently Random Values
Check your servers for CVE-2025-22150
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-2025-22150 affects undici, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
Undici is an HTTP/1.1 client. Starting in version 4.5.0 and prior to versions 5.28.5, 6.21.1, and 7.2.3, undici uses `Math.random()` to choose the boundary for a multipart/form-data request. It is known that the output of `Math.random()` can be predicted if several of its generated values are known. If there is a mechanism in an app that sends multipart requests to an attacker-controlled website, they can use this to leak the necessary values. Therefore, an attacker can tamper with the requests going to the backend APIs if certain conditions are met. This is fixed in versions 5.28.5, 6.21.1, and 7.2.3. As a workaround, do not issue multipart requests to attacker controlled servers.
Severity (CVSS)
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- high: an attack depends on conditions outside the control of the attacker, such as a race
- Privileges required
- none: the attacker does not need an account
- User interaction
- required: a user has to do something, such as open a link or a file
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.78%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 57.0% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 21 Jan 2025):
- Exploitation
- poc: a proof of concept is public
- Automatable
- no: each attack takes manual steps
- Technical impact
- total: full control of the component or of its data
Weakness
- CWE-330 Use of Insufficiently Random Values
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| undici |
affected >= 4.5.0, < 5.28.5 affected >= 6.0.0, < 6.21.1 affected >= 7.0.0, < 7.2.3
|
Is my server affected?
Find the installed version of undici 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 undici
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2025-22150 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2025-22150RHEL, Rocky, Alma, Fedora
rpm -q undici
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2025-22150Alpine
apk list --installed | grep -i undiciWith 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-2025-22150
trivy image --scanners vuln IMAGE | grep CVE-2025-22150
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/nodejs/undici/commit/711e20772764c29f6622ddc937c63b6eefdf07d0 github.com
- https://github.com/nodejs/undici/commit/c2d78cd19fe4f4c621424491e26ce299e65e934a github.com
- https://github.com/nodejs/undici/commit/c3acc6050b781b827d80c86cbbab34f14458d385 github.com
- https://hackerone.com/reports/2913312 hackerone.com
- https://blog.securityevaluators.com/hacking-the-javascript-lottery-80cc437e3b7f blog.securityevaluators.com
- https://github.com/nodejs/undici/blob/8b06b8250907d92fead664b3368f1d2aa27c1f35/lib/web/fetch/body.js#L113 github.com
Source: the record CVE-2025-22150 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