
CVE catalog
CVE-2026-29509
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
- Severity
- Medium · CVSS 5.4
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 0.37% · Oct 25, 2026
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.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | patool | sid | 4.1.0-1 | fixed |
| Debian | patool | forky | 4.1.0-1 | fixed |
| Debian | patool | trixie | 4.0.0-1+deb13u1 | fixed |
| Debian | patool | bookworm | 1.12-5 | not affected |
| Ubuntu | patool | 16.04 | 1.7-1 | vulnerable |
| Ubuntu | patool | 16.04 | 1.8-1 | vulnerable |
| Ubuntu | patool | 16.04 | 1.10-1 | vulnerable |
| Ubuntu | patool | 18.04 | 1.12-3 | vulnerable |
| Ubuntu | patool | 20.04 | 1.12-3 | vulnerable |
| Ubuntu | patool | 20.04 | 1.12-3build1 | vulnerable |
| Ubuntu | patool | 20.04 | 1.12-4 | vulnerable |
| Ubuntu | patool | 20.04 | 1.12-5 | vulnerable |
| Ubuntu | patool | 22.04 | 1.12-5 | vulnerable |
| Ubuntu | patool | 24.04 | 1.12-5 | vulnerable |
| Ubuntu | patool | 24.04 | 2.0.0-2 | vulnerable |
| Ubuntu | patool | 25.10 | 3.1.3-1 | vulnerable |
| Ubuntu | patool | 25.10 | 4.0.0-1 | vulnerable |
| Ubuntu | patool | 26.04 | 4.0.0-1 | vulnerable |
| Ubuntu | patool | 26.04 | 4.0.3-1 | vulnerable |
| Ubuntu | patool | 26.04 | 4.0.4-1 | vulnerable |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | patool | source | sid | 4.0.5-0.1 | not yet assigned | Not reported | Not reported |
| Debian | patool | source | forky | 4.0.5-0.1 | not yet assigned | Not reported | Not reported |
| Debian | patool | source | trixie | 4.0.0-1+deb13u1 | not yet assigned | Not reported | Not reported |
| Debian | patool | source | bookworm | Not affected | unimportant | Not reported | Not reported |
OpenFactory catalog packages
[Debian 13 (Trixie)]
- [patool]Affected
Details (2)
4.0.0-1· all · trixieAffected · Fixed:
4.0.0-1+deb13u1nvd · patool · debian · 13
4.0.0-1· all · trixieAffected · Fixed:
4.0.0-1+deb13u1nvd · patool · debian · 13
[Debian 12 (Bookworm)]
- [patool]Not affected
Details (2)
1.12-5· all · bookwormNot affected
nvd · patool · debian · bookworm
1.12-5· all · bookwormNot affected
nvd · patool · debian · bookworm
Observed:
References
- [https://github.com/wummel/patool/blob/main/doc/changelog.txt]
- [https://github.com/wummel/patool/releases/tag/4.0.5]
- [https://nvd.nist.gov/vuln/detail/CVE-2026-29509]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2026-29509]
- [https://osv.dev/vulnerability/UBUNTU-CVE-2026-29509]
- [https://security-tracker.debian.org/tracker/CVE-2026-29509]
- [https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-29509.json]
- [https://www.vulncheck.com/advisories/patool-path-traversal-via-safe-extract-function]
[Debian Security Tracker] · [FIRST EPSS] · [National Vulnerability Database (NVD)] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX]