Medium severity · published Jul 6, 2026
CVE-2026-55798
Pillow: WindowsViewer.get_command() OS command injection via unescaped shell path
4.5
CVSS
0.2%
EPSS
No
On KEV
Description
Pillow is a Python imaging library. Prior to 12.3.0, WindowsViewer.get_command() constructed a cmd.exe shell command by directly embedding a file path into an f-string without escaping and passed the result to subprocess.Popen(..., shell=True), allowing shell metacharacters in the file path to inject arbitrary cmd.exe commands. This issue is fixed in version 12.3.0.
CVSS vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
Attack vector
Local
Complexity
High
Privileges
None
User interaction
Required
Confidentiality
Low
Integrity
Low
Availability
Low
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.2% · higher than 7% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
PI
Pillow · python-pillow
< 12.3.0 · source: vendor, NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-55798
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-55798
Release Notes
https://github.com/python-pillow/Pillow/blob/main/docs/releasenotes/12.3.0.rst
Patch
https://github.com/python-pillow/Pillow/commit/8404ea5fe5df40fc34aa1e51403dd6fce0778b8a
Patch
https://github.com/python-pillow/Pillow/commit/88194166691b7b603529b8b036ab3ab9cedd2de4
Patch
https://github.com/python-pillow/Pillow/commit/b0e06caa64c1405aa3da0bb1d2bd9a77ca22de7f
Exploit
https://github.com/python-pillow/Pillow/security/advisories/GHSA-4x4j-2g7c-83w6
More from Pillow
9.8
CVE-2026-96639
Pillow multi-frame loaders can reuse stale native image storage after mode transitions
9.8
CVE-2026-112900
Pillow: Argument Injection in Ghostscript call, potentially leading into RCE
9.8
CVE-2026-112403
Pillow: Heap buffer overflow in ImagingJpegDecode
9.8
CVE-2026-112398
Pillow: Heap buffer overflow in FlashPix (FPX) JPEG decoding leads to code execution
9.8
CVE-2026-112393
Pillow: Heap buffer overflow in _tiffWriteProc when saving TIFF to BytesIO
