modern-tar is vulnerable to Path Traversal
50
CVE Score
Medium
Path Traversal
The packTar function in src/fs/pack.ts packs filesystem sources. With dereference: true and a baseDir option, it resolves each source and rejects any whose real path is outside that directory. Before the fix, the check runs only when the final path segment is a symlink, so a path through an ancestor directory symlink is still archived when the resolved file is outside baseDir. The fix resolves every source when both options are set and skips entries outside baseDir.
Upgrade the modern-tar package to version 0.8.6 or later.
You are affected if you are using a version that falls within the vulnerable range and are packing a directory tree with symlink dereferencing enabled alongside an explicit base directory restriction.
0.4.0 - 0.8.5
Fixed in 0.8.6modern-tar is vulnerable to Path Traversal in versions 0.4.0 - 0.8.5.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.