Description
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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| wummel | patool | < 4.0.6 | 4.0.6 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | patool | No fix yet | — |
| Ubuntu 26.04 LTS | patool | No fix yet | — |
| Ubuntu 24.04 LTS | patool | No fix yet | — |
| Ubuntu 22.04 LTS | patool | No fix yet | — |
| Ubuntu 20.04 LTS | patool | No fix yet | — |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | patool | No fix yet | — |
| Ubuntu 16.04 LTS | patool | No fix yet | — |
References
- Patch Commit patch
- https://github.com/wummel/patool product
- https://github.com/wummel/patool/blob/4.0.5/patoolib/util.py#L110-L116 technical-description
- VulnCheck Advisory: patool before 4.0.6 OS Command Injection on Windows via shell_quote_nt third-party-advisory