# CVE-2024-28863: node-tar vulnerable to denial of service while parsing a tar file due to lack of folders count validation

> An attacker can cause a denial of service by providing a tar file with excessively deep sub-folders, consuming memory and crashing the Node.js client.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 21 Mar 2024
- **Updated:** 13 Feb 2025
- **Also known as:** AZL-37115, AZL-37121, AZL-37136, CLSA-2025-1756305640, CLSA-2026-1770717358, CLSA-2026-1775176090, CLSA-2026-1784856406, DEBIAN-CVE-2024-28863, GHSA-f5x3-32g6-xq36, MINI-479r-3hcw-3xwc, MINI-6vjp-gqq9-66fw, ROOT-APP-NPM-CVE-2024-28863, UBUNTU-CVE-2024-28863

## What is CVE-2024-28863?

CVE-2024-28863 is a medium-severity denial of service vulnerability in isaacs node-tar, published on 21 Mar 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

node-tar is a Tar for Node.js. node-tar prior to version 6.2.1 has no limit on the number of sub-folders created in the folder creation process. An attacker who generates a large number of sub-folders can consume memory on the system running node-tar and even crash the Node.js client within few seconds of running it using a path with too many sub-folders inside. Version 6.2.1 fixes this issue by preventing extraction in excessively deep sub-folders.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling), CWE-400 (Uncontrolled Resource Consumption)

## Which versions are affected by CVE-2024-28863?

4 open source packages ship an affected version, including node-tar and tar. It affects 1 product.


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

Products: Isaacs Tar.

## How do I fix CVE-2024-28863?

Upgrade node-tar to 6.2.1 or later.

## Is CVE-2024-28863 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-28863 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-59874](https://insights.sbomify.com/CVE-2026-59874/): node-tar: Negative tar entry size causes infinite loop in archive replace (high 8.7)
- [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)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-28863 and fix it if it is affected.

What it is: CVE-2024-28863 is a medium-severity denial of service vulnerability in isaacs node-tar, published on 21 Mar 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-28863 exists.

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

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-2024-28863/ (Markdown: https://insights.sbomify.com/CVE-2024-28863/index.md)
```

## Sources

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

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