Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. tar
  4. ›
  5. CVE-2026-140242

CVE-2026-140242: node-tar: Non-finite PAX size (Infinity) bypasses validation, causing extraction entry loss and an uncaught exception when re-packing

December 2, 2026

tar (node-tar) does not validate that a numeric size value supplied through a PAX extended header (typeflag x) is finite before it is applied to the following archive entry. A PAX record such as 17 size=Infinity\n is coerced to the JavaScript number Infinity and accepted, because the only guard on the value is a >= 0 check and Infinity >= 0 is true. The non-finite size then propagates into the entry-body state machine and, when the entry is re-packed, into numeric header encoding. Any process that parses, extracts, lists, or re-packs an attacker-supplied archive is affected; no authentication or non-default configuration is required.

References

  • github.com/advisories/GHSA-ph3c-p786-j4rp
  • github.com/isaacs/node-tar/commit/6b815b7c10be504a01af2369a270add7099542d8
  • github.com/isaacs/node-tar/releases/tag/v7.5.24
  • github.com/isaacs/node-tar/security/advisories/GHSA-ph3c-p786-j4rp
  • nvd.nist.gov/vuln/detail/CVE-2026-140242

Code Behaviors & Features

Detect and mitigate CVE-2026-140242 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 7.0.0 before 7.5.24

Fixed versions

  • 7.5.24

Solution

Upgrade to version 7.5.24 or above.

Impact 7.1 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H

Learn more about CVSS

Weakness

  • CWE-1284: Improper Validation of Specified Quantity in Input

Source file

npm/tar/CVE-2026-140242.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 02 Dec 2026 12:17:48 +0000.