# CVE-2026-59874: node-tar: Negative tar entry size causes infinite loop in archive replace

> An attacker can cause a denial of service in node-tar by providing a tar archive with a negative entry size, leading to an infinite loop during archive replacement.

- **Severity:** High 8.7 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 Jul 2026
- **Updated:** 8 Jul 2026
- **Also known as:** CLEANSTART-2026-JQ76135, CLEANSTART-2026-NS47377, CLEANSTART-2026-RB55722, DEBIAN-CVE-2026-59874, ECHO-ddc0-f33b-a817, GHSA-8x88-c5mf-7j5w, MINI-2m92-c7p7-phq2, MINI-2x29-f86x-rpqp, MINI-3hh2-r4c3-4mhr, MINI-4mwf-fq5p-fq82, MINI-5426-2r77-x552, MINI-5hxx-pr38-qr6j, MINI-6ww3-f9xw-8vch, MINI-7mj2-qwpp-chwg, MINI-7w3w-j2m9-m9r6, MINI-8jrm-jw38-h27x, MINI-8rm2-php3-54x6, MINI-c5xp-2732-69mv, MINI-cc7p-9hw5-wpgf, MINI-cpqv-vq67-438c, MINI-f55p-wmhg-3jg7, MINI-fc2x-r23r-784q, MINI-gq7w-5x4r-47pv, MINI-h2fj-6772-2c48, MINI-mrx6-pc3v-vx45, MINI-mw3f-mv9m-v2c9, MINI-p7w3-9xx7-x5qm, MINI-rcqg-jv3q-c9rj, MINI-rfr4-48fm-9q2h, MINI-rpj6-vrg4-ff6x, MINI-rpp9-xp7g-pm36, MINI-rr6p-ghj5-qp8g, MINI-rvpj-7759-6x26, MINI-wphg-2p67-99j6, MINI-wr6g-2w3g-mrg3, MINI-wxcj-39v3-w5h7, MINI-xhgp-r5m3-9frr, ROOT-APP-NPM-CVE-2026-59874, UBUNTU-CVE-2026-59874

## What is CVE-2026-59874?

CVE-2026-59874 is a high-severity denial of service vulnerability in isaacs node-tar, published on 8 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-835 (Loop with Unreachable Exit Condition)

## Which versions are affected by CVE-2026-59874?

2 open source packages ship an affected version, including tar. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `tar` | npm | All versions | 7.5.18 |
| `tar` | npm | All versions | 7.5.18 |

Products: Isaacs Tar.

## How do I fix CVE-2026-59874?

Upgrade tar to 7.5.18 or later.

## Is CVE-2026-59874 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-59874 exists.

## Other vulnerabilities in isaacs node-tar

- [CVE-2026-59873](https://insights.sbomify.com/CVE-2026-59873/): node-tar: Decompression/parse DoS via unlimited input (critical 9.2)
- [CVE-2026-23950](https://insights.sbomify.com/CVE-2026-23950/): node-tar has Race Condition in Path Reservations via Unicode Ligature Collisions on macOS APFS (high 8.8)
- [CVE-2026-31802](https://insights.sbomify.com/CVE-2026-31802/): node-tar Symlink Path Traversal via Drive-Relative Linkpath (high 8.2)
- [CVE-2026-29786](https://insights.sbomify.com/CVE-2026-29786/): node-tar: Hardlink Path Traversal via Drive-Relative Linkpath (high 8.2)
- [CVE-2026-24842](https://insights.sbomify.com/CVE-2026-24842/): node-tar Vulnerable to Arbitrary File Creation/Overwrite via Hardlink Path Traversal (high 8.2)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-59874 and fix it if it is affected.

What it is: CVE-2026-59874 is a high-severity denial of service vulnerability in isaacs node-tar, published on 8 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-59874 exists.

Affected packages and fixed versions:
- tar (npm): affected all versions; fixed in 7.5.18
- tar (npm): affected all versions; fixed in 7.5.18

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-59874/ (Markdown: https://insights.sbomify.com/CVE-2026-59874/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-59874
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-59874
- OSV: https://osv.dev/vulnerability/CVE-2026-59874

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-59874/
Summaries are generated and may contain mistakes; the official description above is the record.
