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.

Severity (CVSS 3.1)5.4Medium
Exploit odds (30 days)0.4%top 68.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:13patool4.0.0-1+deb13u1DEBIAN-CVE-2026-29509
Debian:14patool4.0.5-0.1DEBIAN-CVE-2026-29509
Ubuntu:22.04:LTSpatoolno fix listedUBUNTU-CVE-2026-29509
Ubuntu:24.04:LTSpatoolno fix listedUBUNTU-CVE-2026-29509
Ubuntu:25.10patoolno fix listedUBUNTU-CVE-2026-29509
Ubuntu:26.04:LTSpatoolno fix listedUBUNTU-CVE-2026-29509

Affected products (as reported)

VendorProductVersions
wummel patool 0 – before 4.0.5

Weakness: CWE-22 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N

References