[20] [MODERATE] Use of Insufficiently Random Values in undici #460

Open
opened 2025-06-04 18:37:40 +01:00 by Vylpes · 1 comment
Owner

Package: undici
Affected versions: >= 6.0.0, < 6.21.1
Patched version: 6.21.1


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.

Package: `undici` Affected versions: `>= 6.0.0, < 6.21.1` Patched version: `6.21.1` --- ## 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.
Vylpes added this to the 0.10.0 milestone 2025-06-04 18:37:40 +01:00
Vylpes added the
type
alert
label 2025-06-04 18:37:40 +01:00
Author
Owner

Upgrade undici to version 6.21.2 or later. For example:

undici@^6.21.2:
  version "6.21.2"
Upgrade undici to version 6.21.2 or later. For example: ``` undici@^6.21.2: version "6.21.2" ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: External/card-drop#460
No description provided.