CVE-2026-59203: CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') in python-pillow Pillow
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.
AI Analysis
Technical Summary
Pillow's EPS parser in PIL/EpsImagePlugin.py improperly handles a negative byte count in the %%BeginBinary directive of EPS files. This flaw causes the Image.open() function to enter an infinite loop by repeatedly seeking backwards and re-parsing the same directive. The vulnerability affects Pillow versions from 12.0.0 up to but not including 12.3.0. The issue is classified as CWE-835 (Loop with Unreachable Exit Condition).
Potential Impact
The vulnerability results in a denial of service condition by causing the application to hang or become unresponsive due to an infinite loop when processing a specially crafted EPS file. There is no impact on confidentiality or integrity, only availability is affected.
Mitigation Recommendations
Upgrade Pillow to version 12.3.0 or later, where this issue is fixed. Patch status is confirmed by the version fix information. No other mitigation is indicated.
CVE-2026-59203: CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') in python-pillow Pillow
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.
CVSS v3.1
Score 5.3medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Pillow's EPS parser in PIL/EpsImagePlugin.py improperly handles a negative byte count in the %%BeginBinary directive of EPS files. This flaw causes the Image.open() function to enter an infinite loop by repeatedly seeking backwards and re-parsing the same directive. The vulnerability affects Pillow versions from 12.0.0 up to but not including 12.3.0. The issue is classified as CWE-835 (Loop with Unreachable Exit Condition).
Potential Impact
The vulnerability results in a denial of service condition by causing the application to hang or become unresponsive due to an infinite loop when processing a specially crafted EPS file. There is no impact on confidentiality or integrity, only availability is affected.
Mitigation Recommendations
Upgrade Pillow to version 12.3.0 or later, where this issue is fixed. Patch status is confirmed by the version fix information. No other mitigation is indicated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-07-02T21:05:02.923Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a56616e68715ace43d2702d
Added to database: 07/14/2026, 16:18:54 UTC
Last enriched: 07/21/2026, 18:55:47 UTC
Last updated: 08/27/2026, 22:52:12 UTC
Views: 63
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.