Intel

AIKIDO-2026-959959

patool is vulnerable to OS Command Injection

CVE-2026-106057Published Oct 29, 2026
October 29, 2026

85

CVE Score

High

OS Command Injection

Are you affected? Scan for Free

TL;DR

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.

How do I fix this?

Upgrade the patool package to version 4.0.6 or later.

Who does this affect?

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).

Package

Versions

1.7 - 4.0.5

Fixed in 4.0.6

Background info

patool is vulnerable to OS Command Injection in versions 1.7 - 4.0.5.

Get secure today,
quickly and for free.

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.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea