Skip to content
OpenAdvisories
Medium · 5.4 CVE-2026-29509 EUVD-2026-39879GHSA-p95f-9f9h-wwvh

Patool < 4.0.5 Path Traversal via safe_extract() Function

Published Jun 26, 2026 · Updated Nov 8, 2026 · 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 products

VendorProductAffectedFixed
wummel patool < 4.0.5 4.0.5

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 patool 4.0.5-0.1 —
Debian 13 patool 4.0.0-1+deb13u1 —
ReleasePackageFixed inAdvisory
Ubuntu 26.04 LTS patool No fix yet —
Ubuntu 25.10 patool No fix yet —
Ubuntu 24.04 LTS patool No fix yet —
Ubuntu 22.04 LTS patool No fix yet —
Ubuntu 20.04 LTS patool No fix yet —
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS patool No fix yet —
Ubuntu 16.04 LTS patool No fix yet —

References