CVE-2026-140239: Global Extended Header linkpath Injection in node-tar
Vulnerability ID: CVE-2026-140239
CVSS Score: 7.2
Published: 2026-12-02
CVE-2026-140239 (GHSA-ffhw-4r4q-5cwv) is an improper input validation vulnerability in the node-tar npm package prior to version 8.0.0. An inconsistency between the Header and ReadEntry parsing classes allows an attacker to inject an arbitrary linkpath attribute into all subsequent archive entries via a PAX Global Extended Header (type 'g'). Because the Header class ignores the global linkpath while ReadEntry applies it, the parser's strict-mode integrity validation is bypassed, enabling downstream applications that inspect entry.linkpath to be manipulated into arbitrary file read or write operations outside the extraction directory.
TL;DR
A parsing differential between Header and ReadEntry in node-tar (< 8.0.0) allows PAX Global Extended Headers to inject an unvalidated linkpath attribute into every subsequent archive entry, bypassing strict-mode checks and…