CVE-2026-24884
JSON

8.4high

Compressing Vulnerable to Arbitrary File Write via Symlink Extraction

Severity
8.4high CVSS:3.1 by GitHub_M
Exploit likelihood
0.35% (higher than 30% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-cc8f-xg8v-72m3

Description

Compressing is a compressing and uncompressing lib for node. In version 2.0.0 and 1.10.3 and prior, Compressing 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. This issue has been patched in versions 1.10.4 and 2.0.1.

Affected

Product or packageVersionsReported by
node-modules compressing= 2.0.0, < 1.10.4, before 1.10.4, 2.0.0CVE List, NVD
compressing (npm)from 2.0.0 before 2.0.1, before 1.10.4GitHub Advisory Database

All scores

GitHub_M8.4high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub8.4high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Classification

CWE-59

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

Compressing is a compressing and uncompressing lib for node. In version 2.0.0 and 1.10.3 and prior, Compressing 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. This issue has been patched in versions 1.10.4 and 2.0.1.

GitHub Advisory Database

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
image

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.

NVD (es)

Compressing es una librería de compresión y descompresión para node. En las versiones 2.0.0 y 1.10.3 y anteriores, Compressing extrae archivos TAR mientras restaura enlaces simbólicos sin validar sus destinos. Al incrustar enlaces simbólicos que se resuelven fuera del directorio de extracción previsto, un atacante puede hacer que las entradas de archivos subsiguientes se escriban en ubicaciones arbitrarias en el sistema de archivos del host. Dependiendo de cómo el extractor maneje los archivos existentes, este comportamiento puede permitir sobrescribir archivos sensibles o crear nuevos archivos en ubicaciones críticas para la seguridad. Este problema ha sido parcheado en las versiones 1.10.4 y 2.0.1.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-24884 changed 2026-02-05CVE Terms of Use
GitHub Advisory DatabaseGHSA-cc8f-xg8v-72m3 changed 2026-02-04CC-BY-4.0
NVDCVE-2026-24884 changed 2026-06-17Public domain