5.3medium
Patool < 4.0.5 Path Traversal via safe_extract() Function
- Severity
- 5.3medium CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.28% (higher than 22% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
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
| Product or package | Versions | Reported by |
|---|---|---|
| wummel patool | before 4.0.5 | CVE List |
All scores
| VulnCheck | 5.3medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N |
| VulnCheck | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
NVD (es)
Patool antes de la versión 4.0.5 contiene una vulnerabilidad de salto de ruta en la función safe_extract() en patoolib/programs/py_tarfile.py cuando se ejecuta en Python antes de la versión 3.12, donde la función auxiliar is_within_directory() utiliza os.path.commonprefix() para la comparación de cadenas a nivel de carácter en lugar de la comparación a nivel de ruta, lo que permite que una ruta de miembro de archivo manipulada eluda la verificación de contención. Los atacantes pueden proporcionar un archivo malicioso con rutas de miembro especialmente manipuladas para escribir archivos arbitrarios.
References
| https://github.com/wummel/patool/releases/tag/4.0.5 | patch, release-notes | |
| https://github.com/wummel/patool/blob/main/doc/changelog.txt | release-notes | |
| https://www.vulncheck.com/advisories/patool-path-traversal-via-safe-extract-function | third-party-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-29509 changed 2026-11-08 | CVE Terms of Use |
| NVD | CVE-2026-29509 changed 2026-10-25 | Public domain |