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 is a path traversal vulnerability in the patool archive extraction utility (wummel patool) affecting versions before 4.0.5. The vulnerability exists in the safe_extract() function located in patoolib/programs/py_tarfile.py when run on Python versions earlier than 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 rather than path-level comparison. This allows an attacker to craft archive member paths that bypass the directory containment check, enabling arbitrary file writes outside the target extraction directory.
Potential Impact
An attacker can supply a malicious archive with specially crafted member paths that bypass the safe_extract() directory containment check, potentially writing arbitrary files to locations outside the intended extraction directory. This can lead to unauthorized file creation or overwriting, which may be leveraged for further attacks or system compromise. The CVSS 4.0 score is 5.3 (medium severity), reflecting network attack vector, low complexity, no privileges required, user interaction needed, and low impact on confidentiality and integrity.
Mitigation Recommendations
A fix is available in patool version 4.0.5 and later. Users should upgrade to version 4.0.5 or newer to remediate this vulnerability. Since the vulnerability depends on running on Python versions before 3.12, upgrading Python to 3.12 or later may also mitigate the issue. Patch status is not explicitly confirmed in the vendor advisory, so users should verify the availability of the fix in the official patool release notes or repository.
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 is a path traversal vulnerability in the patool archive extraction utility (wummel patool) affecting versions before 4.0.5. The vulnerability exists in the safe_extract() function located in patoolib/programs/py_tarfile.py when run on Python versions earlier than 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 rather than path-level comparison. This allows an attacker to craft archive member paths that bypass the directory containment check, enabling arbitrary file writes outside the target extraction directory.
Potential Impact
An attacker can supply a malicious archive with specially crafted member paths that bypass the safe_extract() directory containment check, potentially writing arbitrary files to locations outside the intended extraction directory. This can lead to unauthorized file creation or overwriting, which may be leveraged for further attacks or system compromise. The CVSS 4.0 score is 5.3 (medium severity), reflecting network attack vector, low complexity, no privileges required, user interaction needed, and low impact on confidentiality and integrity.
Mitigation Recommendations
A fix is available in patool version 4.0.5 and later. Users should upgrade to version 4.0.5 or newer to remediate this vulnerability. Since the vulnerability depends on running on Python versions before 3.12, upgrading Python to 3.12 or later may also mitigate the issue. Patch status is not explicitly confirmed in the vendor advisory, so users should verify the availability of the fix in the official patool release notes or repository.
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: 07/15/2026, 10:50:24 UTC
Last updated: 08/10/2026, 05:50:05 UTC
Views: 59
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.