CVE-2026-55798

Medium

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.

SeverityMedium
CVSS4.5
Exploit probability—
ProductPython Pillow
PublishedJul 6, 2026
First seenJul 6, 2026

How to fix

Update
  • python pillow12.3.0 or later
  • pillow12.3.0 or later

Affected products

ProductAffected versionsFixed in
python pillowv < 12.3.012.3.0
pillowPyPIv < 12.3.012.3.0

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.