Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.2%top 92%

CVE-2026-55798: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in python-pillow Pillow

0
Medium
VulnerabilityCVE-2026-55798cvecve-2026-55798cwe-78
Published: 07/06/2026 (07/06/2026, 18:44:38 UTC)
Source: CVE Database V5
Vendor/Project: python-pillow
Product: Pillow

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.

CVSS v3.1

Score 4.5medium

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

Affected software

pillow
pkg:pypi/pillow
Affected versions
<12.3.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/14/2026, 08:56:30 UTC

Technical Analysis

The vulnerability in python-pillow Pillow (CVE-2026-55798) involves improper neutralization of special elements in OS commands (CWE-78). Specifically, the WindowsViewer.get_command() function prior to version 12.3.0 embeds a file path directly into a cmd.exe shell command string without escaping special characters. This command string is executed with subprocess.Popen using shell=True, enabling an attacker to inject arbitrary commands through crafted file paths containing shell metacharacters. The vulnerability is resolved in Pillow version 12.3.0 by properly handling or escaping the file path before command execution.

Potential Impact

An attacker who can control or influence the file path passed to WindowsViewer.get_command() may execute arbitrary commands on the host system with the privileges of the process running Pillow. The CVSS score of 4.5 (medium) reflects limited attack vector (local), high attack complexity, no privileges required, and user interaction required. Confidentiality, integrity, and availability impacts are rated low but present.

Mitigation Recommendations

Upgrade to Pillow version 12.3.0 or later, where this vulnerability is fixed. No other official remediation or temporary fixes are documented. Users should avoid using vulnerable versions and ensure that file paths passed to WindowsViewer.get_command() are from trusted sources.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-06-17T14:40:28.381Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 6a4bfce927e9c7971910b4ca

Added to database: 07/06/2026, 19:07:21 UTC

Last enriched: 07/14/2026, 08:56:30 UTC

Last updated: 08/20/2026, 10:52:10 UTC

Views: 125

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses