CVE-2026-24884: Compressing Compressing Vulnerable To Arbitrary File Vulnerability

HIGH
Advisory Identifier: GHSA-cc8f-xg8v-72m3
CVSS 8.4
CWE-59
Published
Advisory Summary

CVE-2026-24884 is a HIGH (CVSS 8.4) compressing vulnerable to arbitrary file vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting Compressing libraries in the npm ecosystem. The issue involves compressing vulnerable to arbitrary file write via symlink extraction. Remediation is available by upgrading affected packages to version 2.0.1, 1.10.4.

CVE-2026-24884 at a Glance

CVE Identifier CVE-2026-24884
GHSA Identifier GHSA-cc8f-xg8v-72m3
Severity HIGH
CVSS v3.1 Base Score 8.4
CWE Classification CWE-59: Improper Link Resolution Before File Access ('Link Following')
Affected Product Compressing
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-24884

To remediate this vulnerability, upgrade all affected Compressing dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

compressing fixed: 2.0.1
npm install compressing@2.0.1
compressing fixed: 1.10.4
npm install compressing@1.10.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls compressing

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-24884, inspect your project dependencies using npm:

npm ls compressing

Analyze the terminal output to locate any version of Compressing in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.1), your application is affected.

Note: The npm ls compressing command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following'), where the product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. In Compressing, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

# 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: ```python 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 ```javascript 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.

CVE-2026-24884 Affected Compressing Versions

2 component(s)
Fixed Versions:
2.0.11.10.4
Product / Package Ecosystem Affected Versions Fixed Version
compressing
npm
≥ 2.0.0
< 2.0.1
All 1 versions
2.0.0
2.0.1
compressing
npm
< 1.10.4
1.10.4

References

Frequently Asked Questions

What is CVE-2026-24884?
CVE-2026-24884 is a security vulnerability in Compressing involving Compressing Vulnerable to Arbitrary File Write via Symlink Extraction under CWE-59: Improper Link Resolution Before File Access ('Link Following').
Which Compressing versions are affected?
Affected versions include releases prior to 2.0.1, 1.10.4 across affected packages: compressing.
What version fixes CVE-2026-24884?
Upgrading to 2.0.1, 1.10.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is compressing affected?
Yes, compressing is affected in releases prior to 2.0.1, 1.10.4. Upgrade your dependency to 2.0.1, 1.10.4 or later.
What is the CVSS score of CVE-2026-24884?
CVE-2026-24884 has a CVSS v3.1 base score of 8.4 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-24884?
CVE-2026-24884 is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following') (The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.).
How can I check npm dependencies for CVE-2026-24884?
Run the dependency tree command: 'npm ls compressing'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-cc8f-xg8v-72m3",
  "modified" : "2026-02-04T21:55:36Z",
  "published" : "2026-02-03T17:42:18Z",
  "aliases" : [ "CVE-2026-24884" ],
  "summary" : "Compressing Vulnerable to Arbitrary File Write via Symlink Extraction",
  "details" : "# Arbitrary File Write via Symlink Extraction in `github.com/node-modules/compressing`\n\n## Brief Introduction\n\nThe `compressing` npm package extracts TAR archives while restoring symbolic links without validating their targets. \nBy 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.\n\nDepending on the extractor’s handling of existing files, this behavior may allow overwriting sensitive files or creating new files in security-critical locations.\n\n## Affected Component and Versions\n\n- **Component**: `github.com/node-modules/compressing`\n- **Affected Versions**: `<= 1.10.3 || =2.0.0` \n\n## Vulnerability Details\n\n### Root Cause\n\n`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.\n\n### Impact\n\nAn attacker who can supply a crafted TAR archive can:\n\n- Cause files to be written outside the intended extraction directory (arbitrary file write via symlink traversal).\n\n- Write files to attacker-controlled paths on the host file system once symbolic links are followed during extraction.\n\n- 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.\n\n## Reproduction\n\n### Environment\n\n- **OS**: Ubuntu 24.04\n- **Node.js**: v24.12.0\n- **compressing**: 2.0.0\n\n### Construct PoC Archive\n\nThe following pseudo-code demonstrates the attack logic:\n\n```python\nbase_dir = \"archive/\"\nwith tarfile.open(\"./poc_arbitrary_write.tar\", mode=\"w\") as tar:\n    add_regular_file(tar, base_dir + \"baseFile.txt\", \"base content\\n\")\n    add_symlink(tar, base_dir + \"myTmp\", \"/tmp\")\n    add_regular_file(tar, base_dir + \"myTmp/poc.txt\", \"Arbitrary File Write\\n\")\n```\n\n### Extract the Archive\n\n```javascript\nconst compressing = require('compressing');\n\nfunction untar(archiveName, destPath) {\n  return compressing.tar.uncompress(archiveName, destPath);\n}\n\n\nasync function main() {\n  const archivePath = process.argv[2];\n  const destPath = \"./output\";\n\n  if (archivePath && archivePath.endsWith(\".tar\")) {\n    await untar(archivePath, destPath);\n  }\n}\n\nmain();\n```\n\n### Attack Results\n\n<img width=\"547\" height=\"161\" alt=\"image\" src=\"https://github.com/user-attachments/assets/5ea12efd-0d3f-4f8a-8414-b3a5c72e153e\" />\n\n\nAfter 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.\n\n## Summary\n\n`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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "compressing"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.1"
      } ]
    } ],
    "versions" : [ "2.0.0" ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "compressing"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.10.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.10.3"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/node-modules/compressing/security/advisories/GHSA-cc8f-xg8v-72m3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-24884"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/node-modules/compressing/commit/8d16c196c7f1888fc1af957d9ff36117247cea6c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/node-modules/compressing/commit/ce1c0131c401c071c77d5a1425bf8c88cfc16361"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/node-modules/compressing"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-59" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-03T17:42:18Z",
    "nvd_published_at" : "2026-02-04T20:16:05Z"
  }
}