undici
Affected
- introduced
4.5.0, fixed5.28.5(semver)
Fixed versions
5.28.5
Fix
- Fixed version
5.28.5npm install [email protected]
Advisory
Also known as: CVE-2025-22150
Use of Insufficiently Random Values in undici
Impact
Undici `fetch()` 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.
Patches
This is fixed in 5.28.5; 6.21.1; 7.2.3.
Workarounds
Do not issue multipart requests to attacker controlled servers.
References
Medium Basis: The source's own band: MODERATE
4.5.0, fixed 5.28.5 (semver)5.28.5
5.28.5npm install [email protected]6.0.0, fixed 6.21.1 (semver)6.21.1
6.21.1npm install [email protected]7.0.0, fixed 7.2.3 (semver)7.2.3
7.2.3npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0