Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade tar to version 8.0.0 or higher.
tar is a full-featured Tar for Node.js.
Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity via PathReservations.getDirs() in the asynchronous extraction path (tar.x, tar.extract, new Unpack()), where a deeply nested entry.linkpath delivered via a GNU 'K' long-linkpath meta entry causes O(n^2) CPU work and unbounded transient heap allocation. The existing maxDepth guard introduced by the CVE-2024-28863 fix applies only to entry.path, leaving entry.linkpath uncapped, so an attacker supplies an archive whose linkpath contains hundreds of thousands of single-character path components. The quadratic allocation exhausts the Node.js heap, freezes the event loop, and terminates the process with an uncatchable FATAL ERROR: heap out of memory (exit 134 / SIGABRT) that neither try/catch nor process.on('uncaughtException') can intercept.
Note: This is only exploitable on POSIX hosts; the reserve() path is a no-op on Windows.