CVE-2024-28863: Denial of service while parsing a tar file due to lack of folders count validation
Description: During some analysis today on npm's node-tar package I came across the folder creation process, Basicly if you provide node-tar with a path like this ./a/b/c/foo.txt it would create every folder and sub-folder here a, b and c until it reaches the last folder to create foo.txt, In-this case I noticed that there's no validation at all on the amount of folders being created, that said we're actually able…
Published Mar 22, 2024 · Updated Jun 10, 2024
Affected packages
node-tar
- Ecosystem
- npm
- Affected
- < 6.2.1
- Fixed in
- 6.2.1
- Check
npm ls node-tar
tar
- Ecosystem
- npm
- Affected
- < 6.2.1
- Fixed in
- 6.2.1
- Check
npm ls tar
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Description:
During some analysis today on npm's node-tar package I came across the folder creation process, Basicly if you provide node-tar with a path like this ./a/b/c/foo.txt it would create every folder and sub-folder here a, b and c until it reaches the last folder to create foo.txt, In-this case I noticed that there's no validation at all on the amount of folders being created, that said we're actually able to CPU and memory consume the system running node-tar and even crash the nodejs client within few seconds of running it using a path with too many sub-folders inside
Steps To Reproduce:
You can reproduce this issue by downloading the tar file I provided in the resources and using node-tar to extract it, you should get the same behavior as the video
Proof Of Concept:
Here's a video show-casing the exploit:
Impact
Denial of service by crashing the nodejs client when attempting to parse a tar archive, make it run out of heap memory and consuming server CPU and memory resources
Report resources
Note
This report was originally reported to GitHub bug bounty program, they asked me to report it to you a month ago
Credited to DEMON1A, AlmogApiiro, ebickle.
References
- https://github.com/isaacs/node-tar/security/advisories/GHSA-f5x3-32g6-xq36
- https://nvd.nist.gov/vuln/detail/CVE-2024-28863
- https://github.com/isaacs/node-tar/commit/fe8cd57da5686f8695415414bda49206a545f7f7
- https://security.netapp.com/advisory/ntap-20240524-0005
- https://github.com/advisories/GHSA-f5x3-32g6-xq36
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-73566
node-tar: Uncontrolled recursion in mapHas/filesFilter allows uncatchable stack-overflow DoS via crafted long-path tar with member selection
high7.5Jul 24, 2026CVE-2026-59871
node-tar: Process crash via PAX numeric path type confusion
medium5.3Jul 20, 2026CVE-2026-59873
node-tar: Decompression/parse DoS via unlimited input
critical7.5Jul 20, 2026CVE-2026-59874
node-tar: Negative tar entry size causes infinite loop in archive replace
high7.5Jul 20, 2026CVE-2026-59875
node-tar: Uncaught Exception DoS via NUL byte in PAX path/linkpath records
medium5.3Jul 20, 2026CVE-2026-53655
node-tar applies PAX size override to intermediary GNU long-name/long-link headers, causing tar parser interpretation differential (file smuggling)
medium6.9Jun 15, 2026
