node-tar 8.0.0 Patched for High-Severity Windows RCE Flaw

2 min read
Source: CVEs | Zero Wire | Cloudflare Radar
node-tar 8.0.0 Patched for High-Severity Windows RCE Flaw
Photo: CVEs | Zero Wire | Cloudflare Radar
TL;DR

A high-severity vulnerability in the node-tar library allows attackers to forge file attributes and execute code on Windows systems. The flaw, fixed in version 8.0.0, exploits newline injection in PAX headers to overwrite package.json files and trigger malicious postinstall scripts.

Key points

  • CVE-2026-140238 affects node-tar versions prior to 8.0.0, a widely used tar archive library for Node.js.
  • The vulnerability enables newline injection in PAX extended-header records, allowing attackers to forge entry attributes.
  • On Windows systems, this can overwrite the package.json file, leading to remote code execution via npm postinstall scripts.
  • The issue is rated 7.2 (High) on the CVSS 4.0 scale, with high integrity impact and low confidentiality impact.
  • The fix is available in node-tar version 8.0.0, released on December 1, 2026.

Background

node-tar is a dependency-free library maintained by Isaac Z. Schlueter, supporting Node.js, Bun, Deno, and Cloudflare. Recent security disclosures in late November 2026 revealed multiple related vulnerabilities, including symlink escapes and PAX header injection issues, suggesting a comprehensive security audit. This new CVE addresses a specific path traversal and CRLF injection flaw that enables attribute forgery.

Why it matters

node-tar is a foundational library in the Node.js ecosystem, used by many npm packages. A vulnerability allowing remote code execution on Windows systems poses a significant risk to developers and users relying on npm for package management. The flaw exploits a common weakness in path handling and header parsing, highlighting the importance of robust input validation in archive libraries.

What to watch

Developers should update node-tar to version 8.0.0 or later to mitigate the vulnerability. Organizations using npm on Windows systems should audit their package.json files for unexpected changes and review postinstall scripts for malicious code. Further security advisories may be released as additional issues are identified in the node-tar library.

Share this article

Want the full story? Read the original reporting

Read on CVEs | Zero Wire | Cloudflare Radar