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
Affects patoolSource GCVE Database
Not known to be exploited · CVSS 5.3 Medium.
Data as of 24 Nov 2026, 20:26 UTC
Thin evidence
One scorer or none| CNA (VulnCheck) | CVSS 4.0 | 5.3 |
|---|---|---|
| CNA (VulnCheck) | CVSS 3.1 | 5.4 |
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 26 Jun 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 23 Nov 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 26.04 LTSpatoolpkg:deb/ubuntu/patool?arch=source&distro=resoluteOther threats | Affected
| Fixed in– |
Ubuntu 25.10patoolpkg:deb/ubuntu/patool?arch=source&distro=questingOther threats | Affected
| Fixed in– |
Ubuntu 24.04 LTSpatoolpkg:deb/ubuntu/patool?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Ubuntu 22.04 LTSpatoolpkg:deb/ubuntu/patool?arch=source&distro=jammyOther threats | Affected
| Fixed in– |
Ubuntu 20.04 LTSpatoolpkg:deb/ubuntu/patool?arch=source&distro=focalOther threats | Affected
| Fixed in– |
Ubuntu 18.04 LTSpatoolpkg:deb/ubuntu/patool?arch=source&distro=bionicOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
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.