Interpretation Conflict Affecting tar package, versions <8.0.0


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-TAR-23314552
  • published2 Dec 2026
  • disclosed2 Dec 2026
  • creditw116tjb

Introduced: 2 Dec 2026

NewCVE-2026-140236  (opens in a new tab)
CWE-436  (opens in a new tab)

How to fix?

Upgrade tar to version 8.0.0 or higher.

Overview

tar is a full-featured Tar for Node.js.

Affected versions of this package are vulnerable to Interpretation Conflict via ReadEntry in src/read-entry.ts and related parsing logic in src/parse.ts and src/pax.ts, which apply PAX extended-header fields inconsistently. ReadEntry copies the PAX size field onto GNU long-name, long-link, and PAX meta entries, causing the parser to frame those entries differently from other tar implementations such as GNU tar, bsdtar, and Python tarfile. An attacker who supplies an archive can cause node-tar to see a different set of entries than a scanner or policy check run before extraction, allowing a file the check did not see to be extracted. Additionally, maxMetaEntrySize is checked against the PAX-overridden entry.size while the meta buffer accumulates header.size bytes, allowing the memory limit to be exceeded, and PAX records are split on newlines rather than by their length field, allowing a value containing a newline to inject a forged record.

PoC

Each finding has a self-contained test in the attached bundle (`exploit_tests/test_vuln_00N_*.cjs`). Each test runs a normal archive (control) and a crafted one (attack) against the unmodified 7.5.22 build, and records both outputs in `exploit_tests/evidence/`. All tests were run on macOS. Behaviour on Linux and Windows wasn't checked, but the affected code is platform-independent.

Note: Tests were run on macOS against the unmodified 7.5.22 build; the advisory notes the affected code is platform-independent.

CVSS Base Scores

version 4.0
version 3.1