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 applicationsLearn about Allocation of Resources Without Limits or Throttling vulnerabilities in an interactive lesson.
Start learningUpgrade 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 Allocation of Resources Without Limits or Throttling via PathReservations.getDirs() in src/path-reservations.ts, which materializes every parent-directory prefix of a given path as individual strings, an O(N²) operation. The existing maxDepth guard applies only to entry.path and not to entry.linkpath, so an archive with a shallow entry.path and a deeply nested entry.linkpath bypasses the guard entirely. Processing such an archive forces a catastrophic heap allocation that exhausts the V8 heap, aborting the process with a fatal out-of-memory error that no JavaScript error handler can intercept.