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 Improper Handling of Highly Compressed Data (Data Amplification) via decompression without backpressure in src/parse.ts (locations 576-577, 551-555, 343) and unbounded queuing of zero-size entries. When reading from a compressed archive, each input chunk is inflated synchronously and its output is buffered in a paused ReadEntry without any backpressure, so memory consumption is not bounded as long as the total decompressed size stays within the maxDecompressionRatio limit. In the same write path, zero-size entries are queued without limit, compounding the unbounded memory growth. A service that extracts or lists untrusted compressed archives can be forced to consume far more memory than the archive's compressed size implies.
`exploit_tests/test_vuln_008_*` and `_011_` measure memory for a control archive and an attack archive against the unmodified 7.5.22 build. Output is in `exploit_tests/evidence/`. The tests were run on macOS.
Note: Tests were run on macOS against the unmodified 7.5.22 build.