Intel

AIKIDO-2026-386051

modern-tar is vulnerable to Path Traversal

Path Traversal Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published 4 days ago

75

High Risk

This Affects:

JSmodern-tar
0.0.0 - 0.7.6
Fixed in 0.7.7
Are you affected? Scan for Free

TL;DR

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.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and extract untrusted archives to the filesystem.

Background info

modern-tar is vulnerable to Path Traversal in versions 0.0.0 - 0.7.6.

How to fix this

Upgrade the modern-tar library to the patch version.