Appsecure logo

CVE-2025-22150: Medium Vulnerability in Undici

CVE-2025-22150 is a medium-severity vulnerability in Undici, the HTTP/1.1 client. It allows attackers to exploit predictable random values in multipart/form-data requests. Immediate patching is advised to mitigate risks.

MEDIUMCVSS 6.8 · Published January 21, 2025

Not a customer? See how AppSecure simulates real world attacks to protect your infrastructure.

Speak to Experts

CVE-2025-22150 is a medium-severity vulnerability affecting Undici, an HTTP/1.1 client. This vulnerability allows attackers to exploit predictable outputs from `Math.random()` used in multipart/form-data requests. The vulnerability exists in versions 4.5.0 through 5.28.5, 6.21.1, and 7.2.3, where the boundary for multipart requests can be predicted. Consequently, if an application sends multipart requests to an attacker-controlled website, the attacker can manipulate the requests to the backend APIs.

The vulnerability has a CVSS score of 6.8, which indicates a medium level of risk. Risk to organizations includes potential data leakage and unauthorized manipulation of requests, which could lead to significant security issues. Organizations should prioritize patching immediately.

To mitigate this vulnerability, users are advised to upgrade to fixed versions 5.28.5, 6.21.1, or 7.2.3. As a temporary workaround, it is recommended not to issue multipart requests to any attacker-controlled servers.

The vulnerability was published on January 21, 2025, and its status is currently deferred. No public exploit has been confirmed, but organizations should remain vigilant.

Organizations should address this vulnerability in their priority patch cycle to ensure backend API security.

Vulnerability Details

The official description of the vulnerability indicates that Undici uses `Math.random()` for choosing the boundary in multipart/form-data requests. The predictability of `Math.random()` can potentially allow attackers to tamper with the backend API requests by manipulating the multipart boundary values. This issue is classified under CWE-330: Use of Insufficiently Random Values.

The CVSS vector string is CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N, indicating a network attack vector with high complexity and requiring user interaction.

This vulnerability impacts multiple versions of the Undici client, specifically from version 4.5.0 to prior to versions 5.28.5, 6.21.1, and 7.2.3.

Technical Analysis

The root cause of CVE-2025-22150 lies in the predictable nature of the `Math.random()` function. Attackers may leverage this weakness to predict the boundary values of multipart/form-data requests. This vulnerability has a high attack complexity since it requires specific conditions to be met, including the presence of a mechanism that sends multipart requests from an application to an attacker-controlled server.

The attack vector is network-based, meaning that an attacker could exploit this vulnerability remotely without needing physical access to the target system. The privileges required are none, and user interaction is required to initiate the multipart request. The potential impacts of this vulnerability include a high confidentiality impact due to possible data leakage and a high integrity impact if requests are tampered with.

Risk & Impact Analysis

The existence of this vulnerability presents a significant risk to organizations using the Undici client, particularly those that handle sensitive data or rely on multipart/form-data requests. If exploited, attackers could manipulate requests to gain unauthorized access or leak sensitive information. The potential blast radius could be extensive if the application is widely deployed or if it interacts with multiple backend services.

Given the CVSS score of 6.8, organizations should assess their exposure to this vulnerability and the potential impact based on their specific use cases. The urgency for remediation is moderate, suggesting that organizations should schedule remediation in their patch cycles.

Signal

Status

Known Exploit

No

Public PoC

No

Actively Exploited

No

Ransomware Use

No

Affected Versions

The affected versions of Undici are 4.5.0 to prior to 5.28.5, 6.21.1, and 7.2.3. Organizations using these versions should upgrade to the latest versions to mitigate the risk associated with this vulnerability.

Mitigation & Remediation

To remediate this vulnerability, organizations should apply the following actions:

1. Upgrade Undici to versions 5.28.5, 6.21.1, or 7.2.3.

2. As a temporary workaround, avoid sending multipart requests to attacker-controlled servers.

3. Implement additional network controls to limit exposure to potentially dangerous requests.

4. Monitor application logs for anomalies related to multipart requests.

Continuous penetration testing can also help identify any weaknesses introduced by this vulnerability.

Detection Guidance

Organizations should monitor for the following indicators to detect potential exploitation of this vulnerability:

1. Unusual patterns in multipart/form-data requests, especially those directed at external servers.

2. Logs indicating unexpected alterations in API responses.

3. Any signs of data leakage or unauthorized access attempts.

AppSecure Threat Intelligence Insight

The long-term significance of CVE-2025-22150 highlights the challenges of using predictable random number generation in critical web applications. It serves as a reminder for developers to leverage secure random number generators to prevent similar vulnerabilities.

Security teams should also consider reviewing their current security practices to ensure they are adequately addressing similar types of vulnerabilities. The adoption of robust coding standards and regular security assessments can help mitigate risks associated with predictable random values.

Penetration testing methodology should be revisited to ensure effective detection and remediation of vulnerabilities like CVE-2025-22150.

For organizations utilizing cloud services, implementing a comprehensive security assessment framework is critical to identify and address vulnerabilities across all services.

Cloud penetration testing can provide valuable insights into potential attack surfaces and help organizations improve their security posture.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Latest CVEs. Recently published vulnerabilities from the NVD database.

View all vulnerabilities
CVE IDSeverity
CVE-2025-65418HIGH
CVE-2025-65417MEDIUM
CVE-2025-65416MEDIUM
CVE-2025-65415MEDIUM
CVE-2025-61314HIGH

Protect Your Business with Hacker-Focused Approach.