Vulnerability · Published Jun 26, 2026 · Assigned by VulnCheck
CVE-2026-29509Patool < 4.0.5 Path Traversal via safe_extract() Function
Medium 5.4
In plain English
A medium-severity path traversal in patool from wummel. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 31% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:13 | patool | 4.0.0-1+deb13u1 | DEBIAN-CVE-2026-29509 |
| Debian:14 | patool | 4.0.5-0.1 | DEBIAN-CVE-2026-29509 |
| Ubuntu:22.04:LTS | patool | no fix listed | UBUNTU-CVE-2026-29509 |
| Ubuntu:24.04:LTS | patool | no fix listed | UBUNTU-CVE-2026-29509 |
| Ubuntu:25.10 | patool | no fix listed | UBUNTU-CVE-2026-29509 |
| Ubuntu:26.04:LTS | patool | no fix listed | UBUNTU-CVE-2026-29509 |
Affected products (as reported)
Weakness: CWE-22 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N