CVE-2026-29509CWE-22

Patool < 4.0.5 Path Traversal via safe_extract() Function

Medium · published June 26, 2026

CVSS v4.0
5.3
EPSS
0%
Percentile
29.9
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v4.0
5.3 · MEDIUM
Vector
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
EPSS
0.00371 · 29.9th percentile
Weakness
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Published
2026-06-26T19:31Z
EPSS history
Timeline
  • 26 JUN 19:31Z
    Patool < 4.0.5 Path Traversal via safe_extract() Function
    cvelistv5