patool: OS command injection on Windows via crafted archive filenames
Summary
patool before 4.0.6 does not properly escape cmd.exe metacharacters and embedded double quotes in archive filenames on Windows. An attacker who can supply an archive with a crafted filename, such as one containing an ampersand, can execute commands with the privileges of the patool process. Exploitation requires that a user or automated job extracts or processes such a file on Windows, and the issue affects single-file formats such as gzip when run with shell=True.
Affected
- patool versions before 4.0.6 (CNA record; VulDB lists up to 4.0.5)
- Windows systems only
- Python environments and applications that embed patool
Fixed in
- Version 4.0.6 (patch commit 592f35761f428afbcde2888ecd3cc4af43881aeb)
Workaround
- Unknown. No vendor workaround is documented.
- Do not pass untrusted archive filenames to patool on Windows until it is upgraded.
Exploitation
- CISA SSVC: Exploitation none, Automatable no, Technical Impact total.
- VulDB: no exploit available.
- No public proof of concept or exploitation reports found; the KEV status was not checked directly.
Our recommendation
- Inventory Windows systems and Python environments for patool (for example with pip show patool).
- Upgrade patool to 4.0.6 or later.
- Check applications that bundle or call patool and treat archives from email, uploads or partners as untrusted until patched.
- Verify the fixed version with your distribution's tracker, since distro status is unclear.
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- VulnCheck advisory www.vulncheck.com
- Patch commit 592f357 github.com
- Vulnerable code at tag 4.0.5 github.com
- patool project on GitHub github.com
- Ubuntu security tracker ubuntu.com
- VulDB entry 414970 vuldb.com
- Hol.org CVE summary hol.org
- PyPI patool 4.0.6 pypi.org
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 1 Nov 2026, 11:15.
Original description (NVD)
patool before 4.0.6 contains an OS command injection vulnerability on Windows because shell_quote_nt fails to escape cmd.exe metacharacters or embedded double quotes in archive filenames. Attackers can supply crafted filenames like report&calc.gz for single-file formats run with shell=True to execute commands with patool process privileges.
NVD references (4)
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
