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 the CHECKDECOMPRESSIONRATIO guard in src/parse.ts, which evaluates the decompression ratio only after node zlib has already materialized the full inflated output in memory. Because compressed bytes are credited per write() call rather than per codec output chunk, a single large write front-loads the entire inputSize × 1000 budget before the ratio is checked even once, allowing the inflated data to reside in memory unconstrained. An attacker can supply a 65,608-byte zstd archive that expands to 2 GiB, causing an OOM kill at default settings with no option overrides required. A second path exists where data written after the tar end-of-archive marker is buffered indefinitely because SAW_EOF stops the parse loop from draining but does not prevent BUFFERCONCAT from appending, giving a piping producer no back-pressure signal.