CVE-2024-47829: CWE-328: Use of Weak Hash in pnpm pnpm
pnpm is a package manager. Prior to version 10.0.0, the path shortening function uses the md5 function as a path shortening compression function, and if a collision occurs, it will result in the same storage path for two different libraries. Although the real names are under the package name /node_modoules/, there are no version numbers for the libraries they refer to. This issue has been patched in version 10.0.0.
AI Analysis
Technical Summary
CVE-2024-47829 identifies a vulnerability in pnpm, a popular JavaScript package manager widely used for managing Node.js project dependencies. Prior to version 10.0.0, pnpm employed the MD5 hashing algorithm within its path shortening function to compress storage paths for installed packages. Specifically, this function generates shortened paths by hashing package identifiers to manage filesystem path length limitations. However, MD5 is a cryptographically weak hash function known to be vulnerable to collision attacks, meaning two distinct inputs can produce the same hash output. In this context, a collision would cause two different libraries to be assigned the same storage path. Since pnpm does not include version numbers in these shortened paths, a collision could lead to overwriting or mixing of package files, potentially causing integrity issues in the dependency tree. This could result in unexpected behavior or runtime errors in applications relying on pnpm-managed dependencies. The vulnerability does not directly expose sensitive data or allow remote code execution but undermines the integrity and reliability of package storage. The issue has been addressed in pnpm version 10.0.0 by replacing MD5 with a more secure hashing mechanism or an improved path shortening approach that mitigates collision risks. No known exploits are currently reported in the wild, and the vulnerability requires no authentication or user interaction to manifest, as it occurs during package installation or resolution processes. The weakness is classified under CWE-328 (Use of Weak Hash), highlighting the risks of relying on deprecated cryptographic primitives in software components.
Potential Impact
For European organizations, the impact of this vulnerability primarily concerns software supply chain integrity and development operations. Organizations using pnpm versions prior to 10.0.0 risk dependency corruption due to hash collisions, which can lead to inconsistent or incorrect package installations. This may cause application failures, increased debugging and remediation costs, and potential delays in deployment cycles. In critical production environments, such integrity issues could affect service availability or reliability, especially in continuous integration/continuous deployment (CI/CD) pipelines that depend on deterministic package management. While the vulnerability does not directly compromise confidentiality or enable remote exploitation, the indirect effects on software integrity could undermine trust in development workflows and increase operational risks. European companies with large-scale Node.js development activities, particularly in sectors like finance, telecommunications, and technology services, may face heightened exposure due to their reliance on pnpm for dependency management. Additionally, organizations involved in software distribution or providing development tools could see reputational damage if affected by dependency collisions. The absence of known exploits reduces immediate threat levels, but the vulnerability's presence in development environments necessitates prompt remediation to prevent future exploitation or accidental corruption.
Mitigation Recommendations
1. Upgrade pnpm to version 10.0.0 or later immediately to benefit from the patched path shortening function that eliminates MD5 usage and collision risks. 2. Audit existing projects and CI/CD pipelines to identify any usage of pnpm versions below 10.0.0 and enforce upgrade policies. 3. Implement integrity verification steps in build processes, such as checksum validation of installed packages, to detect potential corruption caused by path collisions. 4. Where feasible, isolate build environments and use containerization to minimize the impact of corrupted dependencies on broader systems. 5. Monitor package installation logs for anomalies or errors indicative of path collisions or package overwrites. 6. Educate development teams about the risks of weak cryptographic primitives in tooling and encourage adoption of secure software supply chain practices. 7. Consider integrating additional dependency scanning tools that can detect weak hash usage or path collision risks in package managers. These measures go beyond generic patching by emphasizing process improvements, detection, and developer awareness to reduce the likelihood and impact of this vulnerability.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Denmark, Ireland
CVE-2024-47829: CWE-328: Use of Weak Hash in pnpm pnpm
Description
pnpm is a package manager. Prior to version 10.0.0, the path shortening function uses the md5 function as a path shortening compression function, and if a collision occurs, it will result in the same storage path for two different libraries. Although the real names are under the package name /node_modoules/, there are no version numbers for the libraries they refer to. This issue has been patched in version 10.0.0.
AI-Powered Analysis
Technical Analysis
CVE-2024-47829 identifies a vulnerability in pnpm, a popular JavaScript package manager widely used for managing Node.js project dependencies. Prior to version 10.0.0, pnpm employed the MD5 hashing algorithm within its path shortening function to compress storage paths for installed packages. Specifically, this function generates shortened paths by hashing package identifiers to manage filesystem path length limitations. However, MD5 is a cryptographically weak hash function known to be vulnerable to collision attacks, meaning two distinct inputs can produce the same hash output. In this context, a collision would cause two different libraries to be assigned the same storage path. Since pnpm does not include version numbers in these shortened paths, a collision could lead to overwriting or mixing of package files, potentially causing integrity issues in the dependency tree. This could result in unexpected behavior or runtime errors in applications relying on pnpm-managed dependencies. The vulnerability does not directly expose sensitive data or allow remote code execution but undermines the integrity and reliability of package storage. The issue has been addressed in pnpm version 10.0.0 by replacing MD5 with a more secure hashing mechanism or an improved path shortening approach that mitigates collision risks. No known exploits are currently reported in the wild, and the vulnerability requires no authentication or user interaction to manifest, as it occurs during package installation or resolution processes. The weakness is classified under CWE-328 (Use of Weak Hash), highlighting the risks of relying on deprecated cryptographic primitives in software components.
Potential Impact
For European organizations, the impact of this vulnerability primarily concerns software supply chain integrity and development operations. Organizations using pnpm versions prior to 10.0.0 risk dependency corruption due to hash collisions, which can lead to inconsistent or incorrect package installations. This may cause application failures, increased debugging and remediation costs, and potential delays in deployment cycles. In critical production environments, such integrity issues could affect service availability or reliability, especially in continuous integration/continuous deployment (CI/CD) pipelines that depend on deterministic package management. While the vulnerability does not directly compromise confidentiality or enable remote exploitation, the indirect effects on software integrity could undermine trust in development workflows and increase operational risks. European companies with large-scale Node.js development activities, particularly in sectors like finance, telecommunications, and technology services, may face heightened exposure due to their reliance on pnpm for dependency management. Additionally, organizations involved in software distribution or providing development tools could see reputational damage if affected by dependency collisions. The absence of known exploits reduces immediate threat levels, but the vulnerability's presence in development environments necessitates prompt remediation to prevent future exploitation or accidental corruption.
Mitigation Recommendations
1. Upgrade pnpm to version 10.0.0 or later immediately to benefit from the patched path shortening function that eliminates MD5 usage and collision risks. 2. Audit existing projects and CI/CD pipelines to identify any usage of pnpm versions below 10.0.0 and enforce upgrade policies. 3. Implement integrity verification steps in build processes, such as checksum validation of installed packages, to detect potential corruption caused by path collisions. 4. Where feasible, isolate build environments and use containerization to minimize the impact of corrupted dependencies on broader systems. 5. Monitor package installation logs for anomalies or errors indicative of path collisions or package overwrites. 6. Educate development teams about the risks of weak cryptographic primitives in tooling and encourage adoption of secure software supply chain practices. 7. Consider integrating additional dependency scanning tools that can detect weak hash usage or path collision risks in package managers. These measures go beyond generic patching by emphasizing process improvements, detection, and developer awareness to reduce the likelihood and impact of this vulnerability.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2024-10-03T14:06:12.642Z
- Cisa Enriched
- true
Threat ID: 682d9847c4522896dcbf5450
Added to database: 5/21/2025, 9:09:27 AM
Last enriched: 6/22/2025, 9:07:48 AM
Last updated: 8/5/2025, 11:16:23 PM
Views: 14
Related Threats
CVE-2025-8874: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in litonice13 Master Addons – Elementor Addons with White Label, Free Widgets, Hover Effects, Conditions, & Animations
MediumCVE-2025-8767: CWE-1236 Improper Neutralization of Formula Elements in a CSV File in anwppro AnWP Football Leagues
MediumCVE-2025-8482: CWE-862 Missing Authorization in 10up Simple Local Avatars
MediumCVE-2025-8418: CWE-862 Missing Authorization in bplugins B Slider- Gutenberg Slider Block for WP
HighCVE-2025-47444: CWE-201 Insertion of Sensitive Information Into Sent Data in Liquid Web GiveWP
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.