Insecure Randomness Affecting undici package, versions <5.28.5>=6.0.0 <6.21.1>=7.0.0 <7.2.3


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Insecure Randomness vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-UNDICI-8641354
  • published22 Jan 2025
  • disclosed16 Jan 2025
  • creditmcollina

Introduced: 16 Jan 2025

NewCVE-2025-22150  (opens in a new tab)
CWE-330  (opens in a new tab)

How to fix?

Upgrade undici to version 5.28.5, 6.21.1, 7.2.3 or higher.

Overview

undici is an An HTTP/1.1 client, written from scratch for Node.js

Affected versions of this package are vulnerable to Insecure Randomness due to the use of Math.random(), an insufficiently random value generator, for boundary selection in multipart/form-data requests. An attacker can predict the boundary values and manipulate multipart requests by intercepting and analyzing multiple requests to deduce the random generator pattern.

Note:

This is only exploitable if multipart requests are sent to an attacker-controlled server.

CVSS Scores

version 4.0
version 3.1