CVE-2026-59203: CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') in python-pillow Pillow
A vulnerability in the Pillow Python imaging library versions 12.0.0 through 12.2.0 allows an infinite loop during EPS file parsing. The issue arises from the EPS parser accepting a negative byte count in the %%BeginBinary directive, causing Image.open() to repeatedly parse the same directive. This can lead to a denial of service due to application hang. The vulnerability is fixed in version 12.3.0.
AI Analysis
Technical Summary
Pillow versions 12.0.0 through 12.2.0 contain a vulnerability in the EPS parser located in PIL/EpsImagePlugin.py. Specifically, the parser accepts a negative byte count in the %%BeginBinary directive of an EPS file. This causes the Image.open() function to seek backwards to the same directive and parse it repeatedly, resulting in an infinite loop. This vulnerability is identified as CWE-835 (Loop with Unreachable Exit Condition). The issue is resolved in Pillow version 12.3.0.
Potential Impact
This vulnerability can cause denial of service by making the application hang indefinitely when processing a 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 infinite loop vulnerability has been fixed. Patch status is confirmed by the version fix information. No other mitigations are indicated.
CVE-2026-59203: CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') in python-pillow Pillow
Description
A vulnerability in the Pillow Python imaging library versions 12.0.0 through 12.2.0 allows an infinite loop during EPS file parsing. The issue arises from the EPS parser accepting a negative byte count in the %%BeginBinary directive, causing Image.open() to repeatedly parse the same directive. This can lead to a denial of service due to application hang. The vulnerability 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 versions 12.0.0 through 12.2.0 contain a vulnerability in the EPS parser located in PIL/EpsImagePlugin.py. Specifically, the parser accepts a negative byte count in the %%BeginBinary directive of an EPS file. This causes the Image.open() function to seek backwards to the same directive and parse it repeatedly, resulting in an infinite loop. This vulnerability is identified as CWE-835 (Loop with Unreachable Exit Condition). The issue is resolved in Pillow version 12.3.0.
Potential Impact
This vulnerability can cause denial of service by making the application hang indefinitely when processing a 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 infinite loop vulnerability has been fixed. Patch status is confirmed by the version fix information. No other mitigations are 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/14/2026, 16:34:45 UTC
Last updated: 07/14/2026, 16:34:45 UTC
Views: 2
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.