Junglewise Threat Intelligence

CVE-2026-23888: pnpm path traversal in binary extraction (Zip Slip)

CVE-2026-23888 · Severity: low · CVSS 3.1 · Published 2026-01-26

Executive brief

pnpm is a package manager used by developers to install and manage software dependencies. When pnpm downloads and extracts binary dependencies for Node.js or other tools, a flaw allows malicious packages to write files outside the intended directory by exploiting path traversal techniques. An attacker could overwrite critical configuration files or scripts, potentially gaining the ability to execute arbitrary code on affected systems.

Technical details

The vulnerability is a path traversal flaw (CWE-22, "Zip Slip") in pnpm's binary fetching logic. The root cause is improper validation of ZIP entry paths during extraction: the AdmZip library's extractAllTo method does not sanitize paths containing ../ sequences or absolute paths, and the BinaryResolution.prefix field is concatenated directly into the extraction path without validation. An attacker can craft a malicious package with ZIP entries containing traversal sequences (e.g., ../../../.npmrc) or provide a malicious prefix value in a package's resolution metadata to redirect file writes outside the target directory. The attack requires user interaction (installing a package) and network access (from a remote source or compromised registry). Successful exploitation allows overwriting configuration files, scripts, or binaries, potentially leading to remote code execution. The vulnerability affects pnpm versions prior to 10.28.1, which includes a fix that validates and sanitizes extraction paths.

Affected products

  • pnpm pnpm < 10.28.1

Timeline

  • 2026-01-26: disclosed: Advisory published
  • 2026-01-26: patched: Fixed in pnpm v10.28.1

References

Related threats