What’s Vulnerable › Vulnerabilities
CVE-2026-29509: Patool < 4.0.5 Path Traversal via safe_extract() Function
- Severity: medium (CVSS 5.4 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-06-26 · updated 2026-10-25
- Weakness: CWE-22
Description
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.
Affected products
- wummel patool: before 4.0.5 — fixed in 4.0.5
How to fix
Upgrade to a fixed version: wummel patool 4.0.5. Check the vendor advisory for mitigations.
References
- https://github.com/wummel/patool/blob/main/doc/changelog.txt
- https://github.com/wummel/patool/releases/tag/4.0.5
- https://www.vulncheck.com/advisories/patool-path-traversal-via-safe-extract-function
Get alerted when CVE-2026-29509 or the next vulnerability affects your stack