Description
Pillow is a Python imaging library. From 12.0.0 through 12.2.0, Pillow's EPS parser in PIL/EpsImagePlugin.py accepts a negative byte count in the %%BeginBinary directive, allowing a crafted EPS file to cause Image.open() to seek backwards to the same directive and parse it repeatedly in an infinite loop. This issue is fixed in version 12.3.0.
Published: 2026-07-14
Score: 5.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability resides in the EPS parser of Pillow 12.0.0 through 12.2.0, where a negative byte count in a %%BeginBinary directive causes Image.open() to repeatedly seek backward to the same directive and reparse it. This unbounded loop exhausts CPU and memory resources, resulting in a denial of service. The weakness is a control‑flow bug that allows an attacker to trigger an infinite loop (CWE‑835).

Affected Systems

Pillow, a widely used Python imaging library, is impacted by this flaw. All releases from 12.0.0 up to 12.2.0 are vulnerable, while the issue is fixed in version 12.3.0. Applications that load or transform EPS files – especially those that accept user‑supplied documents – are at risk.

Risk and Exploitability

The CVSS score of 5.3 indicates moderate severity, and the EPSS figure of less than 1% points to a low likelihood of exploitation in practice; the vulnerability is not listed in CISA’s KEV catalog. Based on the description, the attack vector likely requires an attacker to supply a crafted EPS file that the application processes with Image.open(), which in turn triggers the infinite loop. No code execution or privilege escalation is achieved; the impact is limited to service disruption on the affected host.

Generated by OpenCVE AI on July 31, 2026 at 10:02 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Pillow to version 12.3.0 or later
  • If an upgrade cannot be applied immediately, disable the EpsImagePlugin by removing its import or blocking EPS files from being opened with Image.open()
  • Implement input validation to reject EPS files with negative %%BeginBinary byte counts before passing them to Pillow
  • Monitor application logs and system resources for repeated parse errors or unusually high CPU usage that may indicate an exploitation attempt

Generated by OpenCVE AI on July 31, 2026 at 10:02 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-pg7v-jwj7-p798 Pillow EpsImagePlugin negative %%BeginBinary byte count causes infinite loop denial of service
History

Thu, 16 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Wed, 15 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 14 Jul 2026 18:00:00 +0000

Type Values Removed Values Added
First Time appeared Python-pillow
Python-pillow pillow
Vendors & Products Python-pillow
Python-pillow pillow

Tue, 14 Jul 2026 16:15:00 +0000

Type Values Removed Values Added
Description Pillow is a Python imaging library. From 12.0.0 through 12.2.0, Pillow's EPS parser in PIL/EpsImagePlugin.py accepts a negative byte count in the %%BeginBinary directive, allowing a crafted EPS file to cause Image.open() to seek backwards to the same directive and parse it repeatedly in an infinite loop. This issue is fixed in version 12.3.0.
Title Pillow EpsImagePlugin negative %%BeginBinary byte count causes infinite loop denial of service
Weaknesses CWE-835
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}


Subscriptions

Python-pillow Pillow
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-15T13:52:17.491Z

Reserved: 2026-07-02T21:05:02.923Z

Link: CVE-2026-59203

cve-icon Vulnrichment

Updated: 2026-07-15T13:52:06.258Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-14T15:43:58Z

Links: CVE-2026-59203 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T10:15:06Z

Weaknesses
  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')