# CVE-2026-29509: patool: Patool before 4.0.5 contains a path traversal vulnerability in the safe_extract() function in patoolib/programs/py_ta...

CVE-2026-29509 is fixed in patool on 1 platform, first by DEBIAN-CVE-2026-29509, released June 28, 2026. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2026-29509
- Priority: Routine
- CVSS: n/a
- EPSS: 0.0037
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Jun 26, 2026

## 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | patool Debian 13.5 (trixie) | 4.0.0-1+deb13u1 | [DEBIAN-CVE-2026-29509](https://patchblox.com/security/data/fix/linux/debian-cve-2026-29509.md) | Jun 28, 2026 |
| Linux | patool Debian 14 | 4.0.5-0.1 | [DEBIAN-CVE-2026-29509](https://patchblox.com/security/data/fix/linux/debian-cve-2026-29509.md) | Jun 28, 2026 |

---

Data as of 2026-11-08T19:12:23Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
