Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft archive with malicious filename
-
DeliveryDeliver to Windows victim
-
ExploitVictim runs patool on single-file format
-
ExecutionUnescaped cmd.exe metacharacters injected via shell=True
-
ImpactExecute arbitrary commands as patool user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires patool before 4.0.6 running on a Windows host (the flaw is in the Windows-specific shell_quote_nt quoting function) and processing of an archive whose filename the attacker controls. The vulnerable code path is a single-file archive format (e.g. .gz) invoked with shell=True, where the crafted filename (e.g. report&calc.gz) is passed to cmd.exe without escaping of metacharacters (^:&|<>()"!) or embedded double quotes. Limiting factors: exploitation is Windows-only, requires the victim to actively run patool against the attacker-supplied file (passive user interaction), and is confined to code paths that invoke the shell for single-file formats; non-Windows platforms and formats not using shell=True are unaffected. Command execution is bounded by the privileges of the patool process. |
| Impact | The provided CVSS 4.0 base score of 8.5 (High) reflects full confidentiality, integrity, and availability impact (VC:H/VI:H/VA:H) from arbitrary command execution, but the vector is local (AV:L) and requires passive user interaction (UI:P) - a victim must run patool against an attacker-supplied archive on Windows. This is NOT a remotely-triggerable, wormable flaw despite the high score; it is weighted up by impact rather than ease of mass exploitation. No EPSS probability was supplied, the CVE is not in CISA KEV, and no public exploit code was indicated in the data, so this is: no public exploit identified at time of analysis. The description provides a concrete working payload concept (report&calc.gz), which lowers the barrier to developing an exploit, but exploitation realistically depends on social engineering (delivering a maliciously-named archive) and the target processing single-file formats with shell=True on Windows. Net assessment: a genuine high-severity code-execution bug that is real but not urgent for most environments - prioritize for Windows systems or automated pipelines that unpack untrusted archives via patool, deprioritize elsewhere. A vendor patch exists, making remediation straightforward. |
| Exploit ScenarioDerived | An attacker crafts an archive with a malicious filename such as report&calc.gz and delivers it to a victim (email, download, shared folder). When the victim uses patool < 4.0.6 on Windows to extract or inspect the file - triggering a single-file-format handler that runs with shell=True - the unescaped cmd.exe metacharacters in the filename are interpreted as commands and execute with the privileges of the patool process. No public proof-of-concept was identified in the provided data, though the advisory describes the payload pattern. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 07, 2026
OS command injection in patool's Windows argument-quoting routine lets a crafted archive filename (for example report&calc.gz) break out of quoting and run arbitrary commands through cmd.exe with the privileges of the patool process. All patool releases before 4.0.6 are affected, but only when patool runs on a Windows host and processes an attacker-supplied archive; the vulnerable path is the single-file-format extraction flow that invokes the shell, and exploitation requires the victim to actively run patool against the malicious file (passive user interaction). No public exploit code or confirmed in-the-wild activity has been identified at time of analysis, and the CVSS 4.0 base score of 8.5 (High) reflects total confidentiality, integrity and availability impact within the local execution context, tempered by the Windows-only, user-assisted attack preconditions. Authentication is not required to trigger the flaw (CVSS 4.0 vector PR:N).
RemediationAI
Upgrade to patool 4.0.6 or later, which is the first release containing the hardened shell_quote_nt() implementation; the upstream fix is commit 592f35761f428afbcde2888ecd3cc4af43881aeb (https://github.com/wummel/patool/commit/592f35761f428afbcde2888ecd3cc4af43881aeb), so distributions shipping patool should backport that commit or rebuild against the patched tarball. Until patool can be updated, avoid processing untrusted archives on Windows with the vulnerable code path: rename or copy downloaded archives into a sanitised filename containing only alphanumerics, dots, underscores and hyphens before calling patool (this removes the metacharacters the injector relies on but is an operational control that must be enforced by every caller); run patool under a low-privilege Windows account or in a constrained container/sandbox so that any command execution is bounded by minimal process privileges (side effect: legitimate extractions may fail on files the sandbox cannot write to); and prefer extracting untrusted .gz/single-file archives with a tool that uses direct exec argument passing rather than shell=True (side effect: adds a second tool to the toolchain and diverges from existing automation). Because exploitation requires a victim to run patool against an attacker-supplied filename, filtering or quarantining archives with shell metacharacters in their names at the mail gateway, download proxy or CI job boundary provides additional defence while patched builds are rolled out. Note the CVSS 4.0 vector indicates PR:N (no authentication needed) but UI:P (passive user interaction required), so no credentials are needed beyond the ability to deliver the crafted file to a Windows host that runs patool.
Affected VersionsENISA
Affected Packages
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
The root cause is CWE-78 (Improper Neutralization of Special Elements used in an OS Command), specifically a platform-specific quoting helper. patool's patoolib/util.py contains shell_quote_nt() (lines ~110-116 in 4.0.5), a Windows quoting function modeled on distutils' _nt_quote_args() that only wrapped a value in double quotes when it contained a space and otherwise returned it unchanged. Because cmd.exe interprets &, |, <, >, (, ), ^, ! and % (and treats embedded double quotes as quote terminators) as control characters, a filename such as report&calc.gz passed to a shell=True subprocess for a single-file format like .gz would cause cmd.exe to parse the injected text as a second command. The fix commit 592f35761f428afbcde2888ecd3cc4af43881aeb rewrites shell_quote_nt() to escape every Windows metacharacter in '^:&|<>()"!' by prefixing it with ^, to replace '%' with '%%', and then to wrap the result in double quotes, with new unit tests (test_quote_nt) asserting the escaped output. The vulnerability is confined to Windows: shell_quote_unix() and non-Windows execution paths, and archive formats that do not route through shell=True, are unaffected. CPE cpe:2.3:a:wummel:patool:*:*:*:*:*:*:*:* identifies the affected package without pinning a version range, consistent with the advisory's 'before 4.0.6' statement.
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
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Attacker-controlled filename must be processed locally (AV:L) and the victim must run patool on it (UI:R); no privileges needed (PR:N), and shell command execution yields full C/I/A.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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.
Executive ViewAI
patool, a widely used archive extraction library, is affected by a high-severity OS command injection vulnerability on Windows that allows an attacker to execute arbitrary commands with the privileges of the patool process when a user extracts a crafted archive. This poses a significant risk to Windows-based endpoints and automated workflows that handle untrusted archives, potentially leading to data theft, system compromise, or lateral movement. No public exploit identified at time of analysis, but because the flaw is unauthenticated and requires only user interaction, security teams should treat it as a priority for immediate remediation.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
EUVD-2026-94305
GHSA-73h5-w67h-9rfh
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB