4.5
MEDIUM CVSS 3.1
CVE-2026-55798
Pillow: WindowsViewer.get_command() OS command injection via unescaped shell path
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.

INFO

Published Date :

July 6, 2026, 7:17 p.m.

Last Modified :

July 6, 2026, 7:38 p.m.

Remotely Exploit :

No
Affected Products

The following products are affected by CVE-2026-55798 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

No affected product recoded yet

CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 3.1 MEDIUM [email protected]
Solution
Update Pillow to version 12.3.0 or later to fix command injection vulnerability.
  • Update the Pillow library to version 12.3.0 or later.
  • Avoid embedding unsanitized file paths in commands.
  • Use subprocess with shell=False when possible.
  • Sanitize file paths before command execution.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-55798 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2026-55798 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2026-55798 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • New CVE Received by [email protected]

    Jul. 06, 2026

    Action Type Old Value New Value
    Added Affected [{'vendor': 'python-pillow', 'product': 'Pillow', 'versions': [{'status': 'affected', 'version': '< 12.3.0'}]}]
    Added 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.
    Added CVSS V3.1 AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
    Added CWE CWE-78
    Added Reference https://github.com/python-pillow/Pillow/blob/main/docs/releasenotes/12.3.0.rst
    Added Reference https://github.com/python-pillow/Pillow/commit/8404ea5fe5df40fc34aa1e51403dd6fce0778b8a
    Added Reference https://github.com/python-pillow/Pillow/commit/88194166691b7b603529b8b036ab3ab9cedd2de4
    Added Reference https://github.com/python-pillow/Pillow/commit/b0e06caa64c1405aa3da0bb1d2bd9a77ca22de7f
    Added Reference https://github.com/python-pillow/Pillow/security/advisories/GHSA-4x4j-2g7c-83w6
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.