CVE-2026-29509 PUBLISHED

Patool < 4.0.5 Path Traversal via safe_extract() Function

Assigner: VulnCheck
Reserved: 04.03.2026 Published: 26.06.2026 Updated: 27.06.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.

Metrics

CVSS 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
CVSS Score: 5.3

Product Status

Vendor wummel
Product patool
Versions Default: affected
  • affected from 0 to 4.0.5 (excl.)

Credits

  • CodeAnt AI Security finder
  • VulnCheck coordinator

References

Problem Types

  • Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') CWE