CVE Database›CVE-2025-22150

CVE-2025-22150

undici: Undici Uses Insufficiently Random Values

Loading…

Severity

Moderate

Red Hat Product Security

6.8

CVSS 3.1

Review impact separately from score.

Published · January 22, 2025

Updated · November 1, 2026

Description

A flaw was found in the undici package for Node.js. 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 an app has a mechanism that sends multipart requests to an attacker-controlled website, it can leak the necessary values. Therefore, an attacker can tamper with the requests going to the backend APIs if certain conditions are met.

Statement

MODERATE impact: CVE-2025-22150 affects Red Hat products and community streams that ship the undici component. In affected applications, undici uses Math.random() to select multipart/form-data boundaries; an attacker-controlled destination can observe enough generated values to predict the boundary and, under the stated conditions, tamper with requests sent to backend APIs. The CVSS 3.1 score is 6.8 (AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N), reflecting the required high attack complexity and user interaction. Current affects mark Fedora 40/41 nodejs20/nodejs22, OpenShift Lightspeed, Red Hat OpenShift AI, Red Hat Developer Hub, Red Hat OpenShift Dev Spaces, and Ansible Services as affected or delegated for handling; records delegated as AFFECTED indicate that a fix is being pursued, while the current RHOAI 2.13 and 2.17 records are marked WONTFIX. Enterprise Application Platform streams and several RHOAI streams/components are delegated NOTAFFECTED, and Red Hat Enterprise Linux 10.0 nodejs22 is NOTAFFECTED because the vulnerable code is not present. The current data provides no further technical reason for the Enterprise Application Platform or RHOAI delegated-NOTAFFECTED records, so no additional reason is asserted. The issue remains conditional on an application sending multipart requests to an attacker-controlled site.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

Until a vendor-provided update containing the fix is available, do not send multipart/form-data requests from affected applications to attacker-controlled destinations. Restrict outbound destinations for such requests with an allowlist or firewall policy, or disable the application feature or path that sends these requests where operationally possible. Upgrade to a vendor-provided update containing the fix when available.

CVSS / CWE

CVSS 3.1 · 6.8
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N

CWE-330 · Use of Insufficiently Random Values