Pillow: WindowsViewer.get_command() OS command injection via unescaped shell path
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- High
- Impact type
- Code execution
- Confidentiality · integrity · availability
- Low · Low · Low
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-78.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| python-pillow | Pillow | before 12.3.0 | 12.3.0 | Patch available | CNA |
| — | Pillow (PyPI) | before 12.3.0 | 12.3.0 | Patch available | GHSA-4x4j-2g7c-83w6 |
- Pillow Vendorpython-pillow Affected before 12.3.0 Fixed in 12.3.0 Patch available CNA
- Pillow (PyPI) Vendor— Affected before 12.3.0 Fixed in 12.3.0 Patch available GHSA-4x4j-2g7c-83w6
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:* | before 12.3.0 | Vulnerable | python-pillow |
- cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:* Versions before 12.3.0 Vulnerable ·python-pillow
Remediation
- Fix · CNA Pillow (python-pillow) Fixed in 12.3.0
- Fix · GHSA-4x4j-2g7c-83w6 Pillow (PyPI) Fixed in 12.3.0 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
Not affected: 11 products
- Exploit Intelligence
- Lightspeed Core
- OpenShift Lightspeed
- Red Hat AI Inference Server
- Red Hat Ansible Automation Platform 2
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux AI (RHEL AI) 3
- Red Hat OpenShift AI (RHOAI)
- Red Hat Quay 3
- Red Hat Satellite 6
Timeline
- 2026-10-02 Threatist record created from CVE-2026-55798
- 2026-10-03 Alias added: GHSA-4x4j-2g7c-83w6
References
Patch 3
More python-pillow Pillow vulnerabilities
- TI-2026-76627 Out-of-bounds read in Pillow TIFF encoder ColorMap handling CVSS 4.0HIGH 8.8
- TI-2026-76625 Quadratic-time denial of service in Pillow PDF save_all CVSS 4.0HIGH 8.7
- TI-2026-76605 NULL pointer dereference in Pillow's Image.merge function CVSS 4.0HIGH 8.7
- TI-2026-76604 Out-of-bounds read in Pillow TIFF decoding leaks heap memory CVSS 4.0HIGH 8.8
- TI-2026-76602 Double free in Pillow ImagingScaleAffine on allocation failure CVSS 4.0HIGH 8.7
- TI-2026-76600 GIF seek in Pillow keeps rejected size, allowing denial of service CVSS 4.0HIGH 8.7
Sources
- CVE-2026-55798 · CVE Program
- CVE-2026-55798 · NVD
- FIRST EPSS
- GHSA-4x4j-2g7c-83w6 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-55798 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences