CVE-2026-29509: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in wummel patool
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.
AI Analysis
Technical Summary
CVE-2026-29509 describes a path traversal vulnerability in the patool utility prior to version 4.0.5. The vulnerability exists in the safe_extract() function located in patoolib/programs/py_tarfile.py when executed on Python versions before 3.12. The root cause is the use of os.path.commonprefix() in the is_within_directory() helper function, which performs character-level prefix comparison instead of path-level comparison. This incorrect check can be bypassed by an attacker supplying a malicious archive with specially crafted member paths, allowing arbitrary file writes outside the intended extraction directory.
Potential Impact
An attacker can craft a malicious archive that, when extracted using vulnerable versions of patool on Python versions before 3.12, can write files to arbitrary locations on the filesystem. This can lead to unauthorized file creation or overwriting, potentially compromising system integrity or security. The CVSS 4.0 base score is 5.3 (medium severity), reflecting network attack vector, low complexity, no privileges required, user interaction needed, and limited confidentiality and integrity impact.
Mitigation Recommendations
A fix is available in patool version 4.0.5. Users should upgrade to version 4.0.5 or later to remediate this vulnerability. Patch status is not explicitly confirmed beyond the version indication, so users should verify with the vendor or official sources for the latest remediation guidance. No vendor advisory content is provided to indicate alternative mitigations or temporary fixes.
CVE-2026-29509: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in wummel patool
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.
CVSS v4.0
Score 5.3medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-29509 describes a path traversal vulnerability in the patool utility prior to version 4.0.5. The vulnerability exists in the safe_extract() function located in patoolib/programs/py_tarfile.py when executed on Python versions before 3.12. The root cause is the use of os.path.commonprefix() in the is_within_directory() helper function, which performs character-level prefix comparison instead of path-level comparison. This incorrect check can be bypassed by an attacker supplying a malicious archive with specially crafted member paths, allowing arbitrary file writes outside the intended extraction directory.
Potential Impact
An attacker can craft a malicious archive that, when extracted using vulnerable versions of patool on Python versions before 3.12, can write files to arbitrary locations on the filesystem. This can lead to unauthorized file creation or overwriting, potentially compromising system integrity or security. The CVSS 4.0 base score is 5.3 (medium severity), reflecting network attack vector, low complexity, no privileges required, user interaction needed, and limited confidentiality and integrity impact.
Mitigation Recommendations
A fix is available in patool version 4.0.5. Users should upgrade to version 4.0.5 or later to remediate this vulnerability. Patch status is not explicitly confirmed beyond the version indication, so users should verify with the vendor or official sources for the latest remediation guidance. No vendor advisory content is provided to indicate alternative mitigations or temporary fixes.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-03-04T15:39:26.871Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a3edc0372d29f1837f4648f
Added to database: 06/26/2026, 20:07:31 UTC
Last enriched: 06/26/2026, 20:13:02 UTC
Last updated: 06/26/2026, 21:00:29 UTC
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.