Skip to main content

Patool EUVDEUVD-2026-39879

| CVE-2026-29509 MEDIUM
Path Traversal (CWE-22)
2026-06-26 VulnCheck GHSA-p95f-9f9h-wwvh
5.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious archive with traversal paths
  2. Delivery
    Deliver archive to target user
  3. Exploit
    User extracts archive with vulnerable Patool
  4. Execution
    Character-prefix check bypassed in is_within_directory()
  5. Persist
    Arbitrary file written outside extraction directory
  6. Impact
    Attacker achieves persistence or privilege escalation

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires three concurrent conditions: Patool version prior to 4.0.5 must be installed; the Python runtime must be earlier than version 3.12 (Python 3.12+ patches the tarfile stdlib behavior that this vulnerability depends on); and a user must invoke Patool's safe_extract() function on an attacker-controlled archive. The attacker must be able to deliver a malicious archive to the target, either via social engineering, a compromised upstream source, or an application that automatically processes user-supplied archives. What limits exploitation is the UI:P requirement - fully automated exploitation without user interaction is not possible. Additionally, the arbitrary file write is bounded by the filesystem permissions of the user running Patool; a non-privileged user cannot overwrite system-owned files.

Impact

The CVSS 4.0 score of 5.3 (AV:N/AC:L/AT:N/PR:N/UI:P) reflects moderate severity, but the real-world integrity impact may be understated by the VI:L assignment - successful exploitation yields arbitrary file write to any path writable by the extracting user, which in practice can enable privilege escalation, backdoor installation, or code execution if writable paths include cron directories, SSH authorized_keys, or application configuration files. Attack complexity is genuinely low once an attacker can deliver a crafted archive. The UI:P requirement (user must extract the archive) is the primary friction point and distinguishes this from fully automated exploitation. No EPSS data was provided in the input. No CISA KEV listing and no confirmed public POC code exist at time of analysis, suggesting exploitation has not been observed at scale. The Python < 3.12 prerequisite limits the realistic exposure window for environments that have already upgraded their Python runtime, but many production deployments still run Python 3.10 or 3.11. The overall risk is real but constrained to scenarios where users extract attacker-supplied archives.

Exploit ScenarioDerived

An attacker hosts or delivers a malicious tar archive containing a member path such as '../../../home/user/.ssh/authorized_keys' with attacker-controlled content. When a victim downloads and extracts the archive using Patool (pre-4.0.5 on Python < 3.12), the is_within_directory() check passes due to the character-prefix flaw, and the attacker's SSH public key is written to the victim's authorized_keys file, granting persistent remote access. No public exploit code has been identified, but the technique is a well-documented class of path traversal attack requiring only a crafted archive.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 26, 2026

Path traversal in Patool's safe_extract() function allows an attacker-controlled archive to write files to arbitrary locations on the filesystem when extracted by a victim running Patool before 4.0.5 on Python before 3.12. The flaw exists because the is_within_directory() helper in patoolib/programs/py_tarfile.py uses os.path.commonprefix() for character-level string prefix matching rather than path-component-level comparison, making it trivially bypassable with crafted member paths. No public exploit or CISA KEV listing has been identified at time of analysis, but the low-complexity exploitation conditions and complete integrity bypass make this a meaningful risk for affected deployments.

RemediationAI

The primary fix is to upgrade Patool to version 4.0.5, the vendor-released patch available at https://github.com/wummel/patool/releases/tag/4.0.5 and documented in https://github.com/wummel/patool/blob/main/doc/changelog.txt. If an immediate upgrade is not possible, upgrading the Python runtime to 3.12 or later mitigates the vulnerability at the stdlib level since Python 3.12 enforces path safety in tarfile extraction, though this may have compatibility implications for other dependencies and should be tested in staging first. As a compensating control, restrict Patool usage to trusted archive sources only and avoid processing archives from untrusted or user-supplied inputs until patched. Do not use Patool to extract archives in privileged directories or as a privileged user, as the blast radius of arbitrary file write scales directly with the privileges of the extracting process.

Affected VersionsENISA

patool 0 <4.0.5

Affected Packages

euvd patool fix: 4.0.5

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Patool (CPE: cpe:2.3:a:wummel:patool) is a Python-based universal archive command-line tool. The vulnerability (CWE-22: Path Traversal) is rooted in a subtle but well-known pitfall of os.path.commonprefix(): it operates character-by-character rather than path-segment-by-segment. For example, the paths '/extract/output' and '/extract/output2/../../../etc/cron.d/' share a character-level common prefix of '/extract/output', causing the containment check to incorrectly conclude the second path is within the first. Python 3.12 addressed zip/tarfile path traversal systematically at the stdlib level, which is why the vulnerability is conditional on Python < 3.12. The affected code path is specifically in patoolib/programs/py_tarfile.py, making it triggered only when Patool processes tar-format archives via the Python tarfile backend.

Know when Patool gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 5.3 MEDIUM
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
vuln.today AI 6.5 MEDIUM

Archive delivered over network (AV:N), no complexity barrier (AC:L), no attacker privileges needed (PR:N), user must extract archive (UI:R), arbitrary file write gives high integrity impact (I:H), no confidentiality or availability impact.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
Red Hat 5.4 MEDIUM

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.3%
Top 80% exploitable
Prevalence
Low
niche Python CLI archive utility, limited enterprise deployment
Data Quality
9 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy