Undici Uses Insufficiently Random Values
CVE-2025-22150Published 21 Jan 2025, 17:46 UTC
Real-world risk
2.4/ 10Low
Routine
PreliminaryFrom the CVSS vector only · confidence low
CVSS
6.8
scored by the vendor (CNA), CVSS 3.1
In plain words
No plain-language summary yet. The original description is below.
Original description (from GitHub_M)
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.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| undiciNiche | >= 4.5.0, < 5.28.5; >= 6.0.0, < 6.21.1; >= 7.0.0, < 7.2.3 | 5.28.5, 6.21.1, 7.2.3 |
What to do
Update to a fixed version: 5.28.5, 6.21.1, 7.2.3.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | Major data exposureReads secrets, credentials, databases, arbitrary files | From the CVSS vector | 0.80 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | HardNarrow race, needs an extra info leak, needs a man-in-the-middle position, or must be chained with another bug | From the CVSS vector | 0.45 |
Threat level T3: Public proof of concept (× 0.95)
A qualifying GitHub proof of concept, an unverified Exploit-DB entry, CISA's SSVC says PoC, or a reference tagged as an exploit
- CISA SSVC: proof of concept
EPSS 0.8% chance of exploitation in 30 days (percentile 57), as of 2026-12-04.
The arithmetic
- Prerequisites multiplied together0.315
- Threat T3: Public proof of concept0.950
- 10 × impact 0.8 × prerequisites 0.315 × threat 0.952.394
- Rounded to one decimal between 0.1 and 102.4
Exploitation and evidence timeline
- 21 Jan 2025 Published
- 3 Dec 2026 CISA SSVC: proof of concept first seen
- 3 Dec 2026 Risk 2.4 (cvss fallback)
Weakness
CWE-330
References
- https://github.com/nodejs/undici/security/advisories/GHSA-c76h-2ccp-4975vendor-advisory
- https://github.com/nodejs/undici/commit/711e20772764c29f6622ddc937c63b6eefdf07d0misc
- https://github.com/nodejs/undici/commit/c2d78cd19fe4f4c621424491e26ce299e65e934amisc
- https://github.com/nodejs/undici/commit/c3acc6050b781b827d80c86cbbab34f14458d385misc
- https://hackerone.com/reports/2913312misc
- https://blog.securityevaluators.com/hacking-the-javascript-lottery-80cc437e3b7fmisc
- https://github.com/nodejs/undici/blob/8b06b8250907d92fead664b3368f1d2aa27c1f35/lib/web/fetch/body.js#L113misc
- CVE-2025-22150 on CVE.org