Skip to content
OpenAdvisories
Medium · 4.5 CVE-2026-55798 BIT-pillow-2026-55798EUVD-2026-41898GHSA-4x4j-2g7c-83w6PYSEC-2026-2257

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

Published Jul 6, 2026 · Updated Jul 7, 2026 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
python-pillow Pillow < 12.3.0 —

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.

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling open-webui 0.10.2-r1 —
Wolfi rolling superset-6.0 6.0.0-r13 —
Wolfi rolling superset-6.1 6.1.0-r6 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI pillow < 12.3.0 12.3.0 GHSA-4x4j-2g7c-83w6

References