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

Summary

CVECVE-2026-55798
StatePUBLISHED
AssignerGitHub_M
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-07-06 19:17:08 UTC
Updated2026-07-07 16:16:40 UTC
DescriptionPillow 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.

Risk And Classification

Primary CVSS: v3.1 4.5 MEDIUM from [email protected]

CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

Problem Types: CWE-78 | CWE-78 CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')


VersionSourceTypeScoreSeverityVector
3.1[email protected]Secondary4.5MEDIUMCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
3.1CNADECLARED4.5MEDIUMCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

CVSS v3.1 Breakdown

Attack Vector
Local
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Python-pillow Pillow affected < 12.3.0 Not specified

References

ReferenceSourceLinkTags
github.com/python-pillow/Pillow/commit/b0e06caa64c1405aa3da0bb1d2bd9a77c... [email protected] github.com
github.com/python-pillow/Pillow/commit/8404ea5fe5df40fc34aa1e51403dd6fce... [email protected] github.com
github.com/python-pillow/Pillow/commit/88194166691b7b603529b8b036ab3ab9c... [email protected] github.com
github.com/python-pillow/Pillow/blob/main/docs/releasenotes/12.3.0.rst [email protected] github.com
github.com/python-pillow/Pillow/security/advisories/GHSA-4x4j-2g7c-83w6 134c704f-9b21-4f2e-91b3-4a467353bcc0 github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis
© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report