
Cloud Vulnerability DB
A community-led vulnerabilities database
The decompress package before version 4.2.1 for Node.js contains a critical path traversal vulnerability (CVE-2020-12265) that was discovered in April 2020. This vulnerability allows attackers to perform arbitrary file writes via '../' in archive members when a symlink is used, enabling directory traversal attacks. The vulnerability affects all versions of the decompress package prior to 4.2.1 (NVD, GitHub Advisory).
The vulnerability stems from the package's failure to properly validate file paths during archive extraction. When processing archive files containing symlinks or path traversal sequences ('../'), the package allows writing files to arbitrary locations outside the intended extraction directory. The vulnerability has received a CVSS v3.1 score of 9.8 (Critical), indicating its severe impact. The issue is tracked as CWE-22 (Path Traversal) and CWE-59 (Link Following) (GitHub Advisory).
This vulnerability can be exploited to write files to arbitrary locations on the filesystem, potentially leading to system compromise. An attacker can craft a malicious archive that, when extracted, could write files outside the intended extraction directory, potentially overwriting system files or adding malicious content to sensitive locations (GitHub Issue).
The recommended mitigation is to upgrade to decompress version 4.2.1 or later, which includes the security fix. The fix prevents directory traversal by implementing proper path validation and symlink handling. The patch was implemented through PR #73, which adds checks to ensure files cannot be written outside the intended extraction directory (GitHub PR).
The vulnerability has received significant attention in the Node.js ecosystem due to its widespread impact through various dependency chains, affecting popular packages like gatsby-plugin-sharp. The community actively participated in discussing and testing various fix approaches, leading to a comprehensive security patch that handles both direct path traversal and symlink-based attacks (GitHub PR).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."