Bug 2497462 (CVE-2026-55798)

Summary: CVE-2026-55798 python-pillow: Pillow: Arbitrary command injection via shell metacharacters in file paths
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: alinfoot, anpicker, anthomas, aprice, aruklets, bbrownin, bdettelb, bparees, cmyers, dfreiber, dnakabaa, doconnor, drow, dschmidt, dtrifiro, ebourniv, ehelms, ggainey, hasun, jburrell, jfula, jkoehler, jlanda, jmitchel, jowilson, jpasqual, jsamir, juwatts, jwong, kaycoth, kshier, lcouzens, lgallett, lphiri, mhulan, nmoumoul, nyancey, oezr, omaciel, ometelka, osousa, pbohmill, pcreech, ptisnovs, rbryant, rchan, rhel-process-autobot, sbunciak, simaishi, smallamp, stcannon, syedriko, teagle, tmalecek, ttakamiy, vkumar, watson-tool-maintainers, weaton, xdharmai, yguenane
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in Pillow, a Python imaging library. The `WindowsViewer.get_command()` function constructed a command-line interface (CLI) shell command by directly embedding a file path without proper escaping. This allowed shell metacharacters within the file path to inject arbitrary commands into `cmd.exe`. An attacker could exploit this to execute unauthorized commands on the system.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2497700, 2497699    
Bug Blocks:    

Description OSIDB Bzimport 2026-07-06 20:02:37 UTC
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.