modern-tar is vulnerable to Path Traversal
75
High Risk
The filesystem extraction API in modern-tar creates symlinks, hardlinks, and files from archive entries while validating link targets only lexically at creation time. Extracting a crafted archive can redirect writes outside the destination directory through unvalidated hardlinks, symlink chains, parent-directory races, or pre-existing link leaves, allowing files to be overwritten beyond the extraction root. Oversized or malformed PAX and metadata entries can also stall parsing and consume excessive resources during extraction. The fix validates the full symlink graph against the resolved destination after extraction, rejects parent swaps and excessive symlink following, opens destination files with O_EXCL, and caps and hardens PAX and metadata parsing.
You are affected if you are using a version that falls within the vulnerable range and extract untrusted archives to the filesystem.
modern-tar is vulnerable to Path Traversal in versions 0.0.0 - 0.7.6.
Upgrade the modern-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