GHSA-cc8f-xg8v-72m3
HIGHCompressing Vulnerable to Arbitrary File Write via Symlink Extraction
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Blast Radius
compressing📦compressingReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.
Description
Arbitrary File Write via Symlink Extraction in github.com/node-modules/compressing
Brief Introduction
The compressing npm package extracts TAR archives while restoring symbolic links without validating their targets.
By embedding symlinks that resolve outside the intended extraction directory, an attacker can cause subsequent file entries to be written to arbitrary locations on the host file system.
Depending on the extractor’s handling of existing files, this behavior may allow overwriting sensitive files or creating new files in security-critical locations.
Affected Component and Versions
- Component:
github.com/node-modules/compressing - Affected Versions:
<= 1.10.3 || =2.0.0
Vulnerability Details
Root Cause
compressing.tar.uncompress sanitizes the destination paths of archive entries, but it does not restrict or validate the targets of symlinks contained in TAR archives. During extraction, the library creates those symlinks inside the output directory. Later entries that resolve through the symlink are written to the symlink target rather than the intended extraction root, enabling an arbitrary file write.
Impact
An attacker who can supply a crafted TAR archive can:
-
Cause files to be written outside the intended extraction directory (arbitrary file write via symlink traversal).
-
Write files to attacker-controlled paths on the host file system once symbolic links are followed during extraction.
-
In environments where extraction is performed with elevated privileges or targets executable paths, this may lead to code execution, privilege escalation, data corruption, or denial of service.
Reproduction
Environment
- OS: Ubuntu 24.04
- Node.js: v24.12.0
- compressing: 2.0.0
Construct PoC Archive
The following pseudo-code demonstrates the attack logic:
base_dir = "archive/"
with tarfile.open("./poc_arbitrary_write.tar", mode="w") as tar:
add_regular_file(tar, base_dir + "baseFile.txt", "base content\n")
add_symlink(tar, base_dir + "myTmp", "/tmp")
add_regular_file(tar, base_dir + "myTmp/poc.txt", "Arbitrary File Write\n")
Extract the Archive
const compressing = require('compressing');
function untar(archiveName, destPath) {
return compressing.tar.uncompress(archiveName, destPath);
}
async function main() {
const archivePath = process.argv[2];
const destPath = "./output";
if (archivePath && archivePath.endsWith(".tar")) {
await untar(archivePath, destPath);
}
}
main();
Attack Results
<img width="547" height="161" alt="image" src="https://github.com/user-attachments/assets/5ea12efd-0d3f-4f8a-8414-b3a5c72e153e" />After extraction, the output directory contains a symlink pointing to /tmp. The file poc.txt is then written through the symlink to /tmp/poc.txt, demonstrating an arbitrary file write outside the extraction directory.
Summary
compressing restores symlinks from TAR archives without validating their targets. By combining a malicious symlink with a subsequent file entry, an attacker can redirect extracted files to arbitrary locations on the host.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | compressing | ≥ 2.0.0&&< 2.0.1 | 2.0.1 |
| 📦npm | compressing | all versions | 1.10.4 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for compressing. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update compressing to 2.0.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-cc8f-xg8v-72m3 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-cc8f-xg8v-72m3 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-cc8f-xg8v-72m3. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-cc8f-xg8v-72m3 in your dependencies?
O3 detects GHSA-cc8f-xg8v-72m3 across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.