Skip to main content

Use of Insufficiently Random Values

CVE-2025-22150

Severity Medium
Score 6.8/10

Summary

Undici is an HTTP/1.1 client. In affected versions, 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 issue affects undici versions 4.4.4 through 5.28.4, 6.0.0 through 6.21.0, and 7.0.0-alpha.1 through 7.2.2. As a workaround, do not issue multipart requests to attacker controlled servers.

  • HIGH
  • NETWORK
  • HIGH
  • UNCHANGED
  • REQUIRED
  • NONE
  • HIGH
  • NONE

CWE-330 - Use of Insufficiently Random Values

The software uses insufficiently random numbers or values in a security context that depends on unpredictable numbers.

Advisory Timeline

  • Published