MEDIUM 5.5

CVE-2026-53655: Node-tar PAX Parser Differential Vulnerability

Node-tar, a popular JavaScript tar archive library, contains a flaw in how it interprets PAX extended headers—a standard mechanism for adding metadata to tar entries. An attacker can craft a malicious tar file that causes node-tar to misalign its reading position within the archive. This misalignment makes node-tar extract a different set of files than other standard tar tools (GNU tar, libarchive, Python's tarfile module). The practical danger: if your organization uses one library to scan an archive for malware or secrets and a different library to actually extract it, an attacker can hide a malicious file from the scanner while ensuring it gets extracted anyway. This creates a gap in security tooling that could allow sensitive or harmful content to slip through undetected.

Source data · NVD / CISA · public domain

CVSS
3.1 · 5.5 MEDIUM · CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
Weaknesses (CWE)
CWE-436
Affected products
1 configuration(s)
Published / Modified
2026-06-22 / 2026-06-26

NVD description (verbatim)

node-tar is a full-featured Tar for Node.js. Prior to 7.5.16, tar (node-tar) applies a PAX extended header's size= record (and other PAX overrides) to the next header entry of any type, including intermediary metadata headers such as a GNU long-name (L) or long-link (K) entry. Per POSIX pax, a PAX extended header (x) describes the next file entry, not the intermediary extension headers that may sit between the x header and the file it annotates. Because node-tar lets the PAX size override the byte length of an intervening L/K/x header, an attacker can desynchronize node-tar's stream cursor relative to every other mainstream tar implementation (GNU tar, libarchive/bsdtar, Python tarfile, and the now-fixed tar-rs / astral-tokio-tar). The result is a tar parser interpretation differential (CWE-436): a single crafted archive yields a different set of members under node-tar than under the reference tar tools. An attacker can use this to hide a member from one parser while it is visible to another, which defeats security tooling whose scanner and extractor disagree on archive contents (e.g. a malware/secret scanner that lists entries with one library while a downstream step extracts with another) This vulnerability is fixed in 7.5.16.

2 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-53655 exploits a deviation from POSIX PAX specification in node-tar versions prior to 7.5.16. The vulnerability arises because node-tar incorrectly applies a PAX extended header's size= override to intervening metadata headers (GNU long-name [L] and long-link [K] entries) rather than only to the primary file entry that the PAX header describes. Per POSIX standard, PAX headers annotate the next file entry, not the extension headers between the PAX header and that file. By manipulating the size= field in a PAX record, an attacker forces node-tar's stream cursor to desynchronize relative to compliant parsers. This results in a tar parser interpretation differential (CWE-436): the same archive produces divergent member lists across implementations. Node-tar's incorrect cursor position causes it to parse or skip different entries than GNU tar, libarchive/bsdtar, Python tarfile, and the corrected tar-rs library.

Business impact

Organizations relying on node-tar for archive processing face two main risks. First, security scanning pipelines that enumerate archive contents with one library and extract with node-tar may be bypassed—a crafted archive could contain hidden files (malware, credentials, proprietary data) that the scanner does not detect but node-tar extracts. Second, any application using node-tar to process untrusted archives without additional validation is vulnerable to supply-chain attacks, particularly in software distribution contexts where tar files are downloaded and processed automatically. The impact depends on whether node-tar is used in security-critical workflows; if it is the sole extraction mechanism, the risk is moderate; if it is part of a multi-layer defense, the risk is lower but still present.

Affected systems

Node-tar versions prior to 7.5.16 are affected. The vulnerability exists in the isaacs tar package, which is widely used in the Node.js ecosystem as a dependency for archive manipulation, build tooling, and package distribution. Any application or tool that bundles or directly depends on node-tar <7.5.16 is potentially affected. This includes npm packages that use node-tar for installation scripts, build processes, or runtime archive operations, as well as standalone Node.js applications that unpack or validate tar archives.

Exploitability

Exploitation requires the attacker to craft a malicious tar archive with carefully positioned PAX extended headers and intermediary metadata entries. The attacker must understand the specific parsing behavior of node-tar and construct an archive such that the PAX size override causes misalignment. A user or system must then process the crafted archive with node-tar. Exploitability is constrained by user interaction (the archive must be processed) and local attack surface; however, in automated or supply-chain contexts (e.g., npm install hooks, container image extraction), the barrier is lower. Public exploit code or proof-of-concept demonstrations would lower the bar further, but none have been observed yet. The CVSS score of 5.5 (Medium) reflects local attack vector and required user interaction, tempered by the high integrity impact.

Remediation

Update node-tar to version 7.5.16 or later. This version corrects the PAX header handling to comply with POSIX specification, ensuring that PAX size overrides apply only to the annotated file entry and not to intervening metadata headers. Organizations should verify dependency versions in their package-lock.json or yarn.lock and initiate a controlled upgrade across all affected projects. For applications with long dependency chains, use npm audit and npm update to identify and patch affected transitive dependencies.

Patch guidance

Upgrade isaacs tar to version 7.5.16 or later. In most Node.js projects, run `npm install tar@latest` or update the version constraint in package.json to ^7.5.16 (or >=7.5.16 depending on your versioning strategy) and run npm install. If tar is a transitive dependency, update the direct dependency that pulls it in, then run npm install to ensure the correct version is resolved. Verify the upgrade with `npm list tar` to confirm version 7.5.16 or later is installed. For production environments, test the patch in a staging environment first, particularly if you have custom tar-processing logic or security scanning integrations.

Detection guidance

Detection is challenging at runtime because the vulnerability relies on archive structure, not code execution signatures. Consider these approaches: (1) Monitor and audit which versions of node-tar are deployed across your codebase using `npm audit` and software composition analysis (SCA) tools. (2) If you operate a security scanning pipeline, audit whether the scanner and extraction tool use the same tar library; mismatches are a red flag. (3) For suspicious or untrusted tar archives, run them through both node-tar and a reference implementation (e.g., system tar command) and compare the member lists programmatically. (4) In supply-chain scenarios (npm install, container image pulls), implement artifact signing and verification to ensure archives have not been tampered with in transit.

Why prioritize this

This vulnerability should be prioritized in environments where node-tar is used in security-critical workflows or supply-chain processes. Tier 1 priority: applications that use node-tar to scan or validate untrusted archives (malware detection, secrets scanning, compliance scanning). Tier 2 priority: npm packages and tools that extract archives as part of automated build or install processes. Tier 3 priority: applications where node-tar is used only for trusted, internal archives. The Medium CVSS score reflects the constraint that exploitation requires a crafted archive and user interaction, but the integrity impact (hiding files) and potential for security tool bypass elevate the practical risk in certain contexts.

Risk score, explained

The CVSS 3.1 score of 5.5 (Medium) is calculated as CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N. Attack Vector Local reflects that the attacker must supply a crafted archive to the target system. Attack Complexity Low means the archive construction, while requiring knowledge of node-tar's behavior, is straightforward once understood. Privileges Required None and User Interaction Required indicate that an unprivileged user must process the archive. Scope Unchanged means the impact is limited to the archive processing context. Confidentiality impact is None (no data disclosure), but Integrity is High because the attacker can hide or misrepresent archive contents, defeating validation logic. Availability is not impacted. The score appropriately reflects a medium-severity integrity flaw that is not universally critical but is serious in security-sensitive contexts.

Frequently asked questions

What is a PAX extended header, and why does node-tar's handling matter?

PAX (POSIX.1-2001 pax utility) extended headers are metadata records in tar archives that can store file attributes (permissions, timestamps, sizes) with greater precision than the classic tar header format. They are part of the POSIX tar standard and widely used in modern archives. Node-tar's vulnerability stems from applying a PAX header's size override to the wrong entry—intervening metadata headers instead of only the primary file. This breaks compatibility with the POSIX standard and other tar implementations, enabling parser differentials.

How does this vulnerability affect my security scanning workflow?

If you use one library (e.g., libarchive) to list archive contents and another (e.g., node-tar) to extract them, a crafted archive could show different members in each operation. An attacker could hide a malicious file from your scanner while ensuring it is extracted by your extraction tool. To mitigate, ensure your scanner and extractor use the same library, or compare their results and alert on mismatches.

Do I need to patch if I only extract trusted archives?

If your archives come exclusively from trusted, internal sources and have not been tampered with in transit, the risk is lower but not zero. However, patching is still recommended because supply chains can be compromised unexpectedly, and the patch is straightforward. Prioritize patching if you process any archives from external or less-trusted sources.

Is there a workaround if I cannot update node-tar immediately?

Until you update, minimize use of node-tar for processing untrusted archives. If you must process external archives, perform additional validation: extract the archive, verify the file list against a reference tool (e.g., system tar), and alert on discrepancies. However, these workarounds are not foolproof and should not replace a proper patch.

This analysis is provided for informational purposes and does not constitute professional security advice. Organizations should independently verify all remediation steps against the official isaacs tar repository and their own environment. CVSS scores and affected product information are based on published CVE data; verify against the National Vulnerability Database (NVD) and vendor advisories for the most current information. No exploit code or weaponized proof-of-concept is provided. Consult with your security team before deploying patches in production environments. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).