CVE-2024-28863: node-tar vulnerable to 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 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 payload.txt archeive.tar.gz
Note This report was originally reported to GitHub bug bounty program, they asked me to report it to you a month ago
Other sources
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.
— NVD
node-tar vulnerable to denial of service while parsing a tar file due to lack of folders count validation
— Microsoft
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-28863?
CVE-2024-28863 has been classified with a significant risk due to its impact on folder creation and potential for unauthorized file manipulation.
How do I fix CVE-2024-28863?
To mitigate CVE-2024-28863, ensure you update to node-tar version 6.2.1 or later.
What products are affected by CVE-2024-28863?
CVE-2024-28863 affects F5 BIG-IP (iRulesLX/iAppsLX) versions 15.1.0 to 15.1.10, 16.1.0 to 16.1.4, and 17.1.0 to 17.1.1, alongside specific npm packages like node-tar.
What vulnerabilities does CVE-2024-28863 relate to in npm's node-tar?
CVE-2024-28863 is related to the folder creation process in the npm package node-tar, which allows for incorrect path manipulations.
Is there a patch available for CVE-2024-28863?
Yes, there are patches available for IBM Cognos Analytics and a specific update for node-tar to address CVE-2024-28863.