CVE catalog

CVE-2026-29509

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

[CVE catalog]

Severity
Medium · CVSS 5.4CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Published
Source
[NVD] · [CVE record]
EPSS
0.37% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debianpatoolsid4.1.0-1fixed
Debianpatoolforky4.1.0-1fixed
Debianpatooltrixie4.0.0-1+deb13u1fixed
Debianpatoolbookworm1.12-5not affected
Ubuntupatool16.041.7-1vulnerable
Ubuntupatool16.041.8-1vulnerable
Ubuntupatool16.041.10-1vulnerable
Ubuntupatool18.041.12-3vulnerable
Ubuntupatool20.041.12-3vulnerable
Ubuntupatool20.041.12-3build1vulnerable
Ubuntupatool20.041.12-4vulnerable
Ubuntupatool20.041.12-5vulnerable
Ubuntupatool22.041.12-5vulnerable
Ubuntupatool24.041.12-5vulnerable
Ubuntupatool24.042.0.0-2vulnerable
Ubuntupatool25.103.1.3-1vulnerable
Ubuntupatool25.104.0.0-1vulnerable
Ubuntupatool26.044.0.0-1vulnerable
Ubuntupatool26.044.0.3-1vulnerable
Ubuntupatool26.044.0.4-1vulnerable

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianpatoolsourcesid4.0.5-0.1not yet assignedNot reportedNot reported
Debianpatoolsourceforky4.0.5-0.1not yet assignedNot reportedNot reported
Debianpatoolsourcetrixie4.0.0-1+deb13u1not yet assignedNot reportedNot reported
DebianpatoolsourcebookwormNot affectedunimportantNot reportedNot reported

OpenFactory catalog packages

[Debian 13 (Trixie)]

  • [patool]Affected
    Details (2)
    • 4.0.0-1 · all · trixie

      Affected · Fixed: 4.0.0-1+deb13u1

      nvd · patool · debian · 13

    • 4.0.0-1 · all · trixie

      Affected · Fixed: 4.0.0-1+deb13u1

      nvd · patool · debian · 13

[Debian 12 (Bookworm)]

  • [patool]Not affected
    Details (2)
    • 1.12-5 · all · bookworm

      Not affected

      nvd · patool · debian · bookworm

    • 1.12-5 · all · bookworm

      Not affected

      nvd · patool · debian · bookworm

Observed:

References