CVE-2026-59874

node-tar: Negative tar entry size causes infinite loop in archive replace

Published Jul 8, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
Description
node-tar is a tar archive manipulation library for Node.js. Prior to 7.5.18, tar.replace accepts a checksum-valid tar header with a negative base-256 encoded entry size, causing the archive scanner to make no progress while repeatedly parsing the same header. This issue is fixed in version 7.5.18.

Analysis

AI-generated

Technical impact

A negative base field inside a checksum‑valid tar header triggers tar.replace in the node‑tar library to repeatedly parse the same header without advancing. This flaw results from insufficient input validation (CWE‑606) and causes an unbounded CPU consumption loop (CWE‑835). The library then stalls, potentially exhausting resources of the Node.js process that invoked replace, leading to a denial of service.

Affected Systems

The vulnerable code path exists in all releases of the isaacs:node‑tar library older than version 7.5.18. Any Node.js application that imports this library and calls the replace function—whether directly or indirectly via other modules—is exposed. The remedy was applied in the 7.5.18 release.

Risk and Exploitability

Based on the description, the likely attack vector involves supplying a malicious tar archive with a negative entry size to the replace routine; exploitation is feasible by an actor that can provide such a header, and no elevated privileges are required. The EPSS score of less than 1% indicates a low likelihood of widespread exploitation, and the vulnerability is not listed in CISA's KEV catalog. However, its CVSS score of 8.7 highlights the severity of the denial‑of‑service impact, emphasizing that an attacker could degrade or crash a target application by repeatedly invoking replace with a malicious header.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the isaacs node-tar package to version 7.5.18 or later
  • Audit application code to remove or replace any use of tar.replace that processes potentially untrusted tar archives
  • If the library must remain in use, add checks to reject tar headers with negative entry sizes before they reach tar.replace

Generated by OpenCVE AI on August 1, 2026 at 16:05 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-8x88-c5mf-7j5w node-tar: Negative tar entry size causes infinite loop in archive replace
History
Type Values Removed Values Added
First Time appeared Isaacs
Isaacs tar
Vendors & Products Isaacs
Isaacs tar
Type Values Removed Values Added
Weaknesses CWE-606
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Important

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description node-tar is a tar archive manipulation library for Node.js. Prior to 7.5.18, tar.replace accepts a checksum-valid tar header with a negative base-256 encoded entry size, causing the archive scanner to make no progress while repeatedly parsing the same header. This issue is fixed in version 7.5.18.
Title node-tar: Negative tar entry size causes infinite loop in archive replace
Weaknesses CWE-835
References
Metrics cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-606

    Unchecked Input for Loop Condition

  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 8, 2026, 5:00 PM
Reserved
Jul 7, 2026, 3:41 PM
Status
Analyzed
Published
Jul 8, 2026, 4:16 PM
Modified
Oct 25, 2026, 5:10 PM
Severity
Important
Public date
Jul 8, 2026, 3:23 PM