Intel

AIKIDO-2026-10861

patool is vulnerable to Path Traversal

Path Traversal Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published May 20, 2026

75

High Risk

This Affects:

PYTHONpatool
2.4.0 - 4.0.4
Fixed in 4.0.5
Are you affected? Scan for Free

TL;DR

Patool's Python tarfile extraction path checks TAR member paths with an unsafe prefix comparison. A crafted TAR archive can use path traversal or sibling-prefix paths to place files and directories outside the requested extraction directory. This can overwrite or create attacker-controlled files when applications extract untrusted TAR archives. The fix resolves both the target path and extraction directory and uses commonpath containment before extracting members.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and extracting TAR archives with the Python tarfile module on Python versions before 3.12.

Background info

patool is vulnerable to Path Traversal in versions 2.4.0 - 4.0.4.

How to fix this

Upgrade the patool library to the patch version.