CVE-2025-22150nodejs undici
Medium 6.8 No auth needed
Follow: this CVE · nodejs · nodejs undici We alert you by email or Slack (account required).
- Priority
- 56
- CVSS 3.1
- 6.8
- EPSS
- 1.2% probability of exploitation in 30 days · percentile 68
- Auth required
- No
- Published
- Jan 21, 2025
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-330
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
What happens
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.
What to do
- Apply the vendor's security update for undici.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | undici |
≥ 4.5.0 < 5.28.5 |
5.28.5 |
npm install undici@5.28.5 |
| npm | undici |
≥ 6.0.0 < 6.21.1 |
6.21.1 |
npm install undici@6.21.1 |
| npm | undici |
≥ 7.0.0 < 7.2.3 |
7.2.3 |
npm install undici@7.2.3 |
Per OSV / GitHub Advisories (GHSA-c76h-2ccp-4975). Check the version in your lockfile before upgrading.
Affected products
- nodejs · undici
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official advisories
- Security update for nodejs18 · SUSE · SUSE-SU-2026:4261-1 · Sep 18, 2026 Critical
- Security update for nodejs18 · SUSE · SUSE-SU-2026:4248-1 · Sep 17, 2026 Critical
- Security update for nodejs20 · SUSE · SUSE-SU-2026:3930-1 · Sep 3, 2026 Critical
Also: SUSE (+3)
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.