Insufficient Verification of Data Authenticity 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-23314617
  • published2 Dec 2026
  • disclosed1 Dec 2026
  • creditArjun Jain

Introduced: 1 Dec 2026

NewCVE-2026-140239  (opens in a new tab)
CWE-1284  (opens in a new tab)
CWE-345  (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 Insufficient Verification of Data Authenticity via the #slurp() method in src/read-entry.ts, which fails to filter linkpath when applying PAX Global Extended Header (g-type) fields to parsed entries. A tar archive containing a Global Extended Header with a linkpath field causes that attacker-controlled value to be injected into every subsequent entry returned by tar.Parser, including plain File and Directory entries, with no warning raised even under strict: true. Applications that consume tar.Parser or tar.list() directly and use entry.linkpath to build filesystem paths or create symlinks can be made to read or write files outside the intended directory.

Note: This is only exploitable in applications that use tar.Parser or tar.list() directly and act on entry.linkpath without revalidating it; tar.x() and tar.extract() are not affected because the Unpack layer independently rejects an escaping linkpath.

CVSS Base Scores

version 4.0
version 3.1