tar is vulnerable to Uncontrolled Recursion
53
Medium Risk
The filesFilter helper in tar installs a recursive mapHas function whenever a caller lists or extracts an archive with a member-selection list. mapHas walks an entry path upward one directory segment per recursive call with no depth limit, so a crafted archive using a long-path header can supply tens of thousands of path segments. Parsing such an entry overflows the call stack and throws an uncatchable error that terminates the process on streaming and async consumers, before any depth guard runs. The fix caps the recursion depth in mapHas.
You are affected if you are using a version that falls within the vulnerable range and your application lists or extracts untrusted archives with a member-selection list.
tar is vulnerable to Uncontrolled Recursion in versions 3.0.0 - 7.5.20.
Upgrade the tar library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant