CVE-2026-55798

Pillow: WindowsViewer.get_command() OS command injection via unescaped shell path

State
Published
Severity
4.5 Medium
Published
Jul 6, 2026
Updated
Jul 7, 2026
Reserved
Jun 17, 2026

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.14.5 MediumCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:LGitHub_M

Weaknesses

  • CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Affected Products

ProductVersions
Pillowpython-pillow
  • < 12.3.0Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.