patool is vulnerable to OS Command Injection
85
CVE Score
High
OS Command Injection
On Windows, shell_quote_nt in patoolib/util.py quotes only values containing a space and returns filenames with cmd.exe metacharacters or embedded double quotes unescaped. Single-file archive operations pass untrusted archive filenames through shell_quote into shell=True command strings, so a crafted filename like report&calc executes attacker commands with patool privileges. The fix escapes cmd.exe metacharacters and percent signs and wraps every value in double quotes.
Upgrade the patool package to version 4.0.6 or later.
You are affected if you are using a version that falls within the vulnerable range and run patool on Windows to extract or create a single-file archive (gzip, bzip2, xz or lzma).
1.7 - 4.0.5
Fixed in 4.0.6patool is vulnerable to OS Command Injection in versions 1.7 - 4.0.5.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.