CVE-2026-29509
MediumCVSS 5.4Exploitation Probability (EPSS)
Low risk20th percentile - higher than 20% of all known CVEs
Summary
Patool before version 4.0.5 contains a path traversal vulnerability in the safe_extract() function in patoolib/programs/py_tarfile.py when running on Python before 3.12. The vulnerability arises because the is_within_directory() helper uses os.path.commonprefix() for character-level string comparison instead of path-level comparison, allowing a crafted archive member path to bypass the containment check.
Risk Assessment
An attacker can supply a malicious archive with specially crafted member paths to write arbitrary files on the victim's system, potentially leading to system compromise or privilege escalation.
Recommendation
Immediately update Patool to version 4.0.5 or later and ensure Python 3.12 or later is used to mitigate this vulnerability.
Other vulnerabilities in Patool
Original NVD description (English source)
Patool before 4.0.5 contains a path traversal vulnerability in the safe_extract() function in patoolib/programs/py_tarfile.py when running on Python before 3.12, where the is_within_directory() helper uses os.path.commonprefix() for character-level string comparison instead of path-level comparison, allowing a crafted archive member path to bypass the containment check. Attackers can supply a malicious archive with specially crafted member paths to write arbitrary files.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

