/

CVE-2026-101894

Severity:

CRITICAL RISK

(9.1)

Path Traversal (CWE-22) in Node.js Decompress Package

CVE-2026-101894

Undergoing Analysis

Vulnerability type

Category:

Path Traversal via Symlink Following

CWE:

CWE-22, CWE-59

Impact:

Arbitrary File Read/Write and Potential Remote Code Execution

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal vulnerability in the Node.js decompress package allows crafted archives to escape the intended extraction directory through chained symbolic links. An attacker who can provide or cause processing of such an archive may read or overwrite files outside the output directory, potentially resulting in remote code execution when startup scripts or configuration files are affected.

Affected context

The vulnerability affects applications that use the package's default archive-extraction API to process attacker-controlled or insufficiently trusted archives. It becomes risky when extraction occurs into a directory where symbolic links can be created and later followed, because lexical path checks alone may not reflect the filesystem path resolved by the kernel.

Exploit preconditions

  • Attack surface: Archive extraction through the Node.js decompress API
  • Required access: Ability to supply, upload, or influence an archive processed by the application
  • Trigger point: Extraction of chained symbolic-link entries followed by later archive entries
  • Why exploitation is possible: Lexical containment checks may approve a path while filesystem resolution redirects it outside the intended output directory

Why this happens

The underlying bug is incomplete protection against archive entries that create symbolic links and later rely on those links during extraction.

The package checks whether an entry's textual path appears to remain inside the destination directory, but this does not fully account for kernel-level path resolution after links have been planted. This behavior maps primarily to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, with CWE-59: Improper Link Resolution Before File Access describing the unsafe handling of symbolic links.

Potential impact

  • Files outside the extraction directory may be read
  • Arbitrary files may be overwritten or modified
  • Application configuration or startup scripts could be tampered with
  • Application secrets or sensitive data could be disclosed
  • Remote code execution may occur in affected application contexts
  • Downstream services or hosts could be compromised through altered files

General mitigation guidance

Mitigation generally focuses on treating archive contents as untrusted and enforcing containment after filesystem resolution rather than relying only on lexical path checks.

Common defensive patterns include:

  • Use a maintained extraction implementation with protections for symbolic links and resolved paths
  • Reject or isolate symbolic-link and hard-link entries when they are not required
  • Resolve candidate paths and verify that the resulting filesystem location remains within the extraction root
  • Extract into a dedicated, least-privileged temporary directory
  • Prevent extracted files from influencing executable startup paths or sensitive configuration locations
  • Apply resource limits, sandboxing, and filesystem permissions to the extraction process
  • Reduce trust in archive metadata and validate entry types before writing files

How teams detect issues like this

Organizations can identify this class of issue through:

  • Static analysis and dependency review for archive extractors lacking resolved-path containment checks
  • Code review signals involving archive entry paths, symbolic-link creation, and filesystem writes
  • Tests using nested symbolic links, path normalization differences, and attempts to escape extraction roots
  • Dependency policies that identify unmaintained or vulnerable archive-processing packages
  • Runtime monitoring for unexpected writes outside designated temporary extraction directories
  • Automated security review tools that flag archive traversal and unsafe link-resolution patterns

Sources

SourceLink
github.comgithub.com/XhmikosR/decompress/commit/5f4b2f64abb31bbaf1fef8975b595fd7df2558d8
github.comgithub.com/XhmikosR/decompress/commit/f6c88c668216d6a12c6cecf4fe0b6c70bf77050a
github.comgithub.com/XhmikosR/decompress/releases/tag/v10.2.2
github.comgithub.com/XhmikosR/decompress/releases/tag/v11.1.4
github.comgithub.com/XhmikosR/decompress/security/advisories/GHSA-hrh2-vp3x-79xf

Frequently asked

questions

It can be remotely exploitable when an application accepts archives from untrusted users or remote sources and processes them automatically. Exploitability depends on how the application exposes archive upload or ingestion functionality.

An attacker generally needs the ability to provide or influence an archive that reaches the vulnerable extraction code. They do not necessarily need direct filesystem access if the application performs extraction on their behalf.

Use an extraction implementation that safely handles symbolic links and verifies resolved filesystem paths remain inside a dedicated extraction directory. Rejecting unnecessary link entries provides an additional defense.

Treat archives as hostile input, test extraction logic against link-based and normalization-based escapes, run extraction with minimal privileges, and enforce dependency and code-review policies for filesystem-boundary checks.

Find out what's already
exploitable in your codebase.