CVE-2026-42310: CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') in python-pillow Pillow
Pillow is a Python imaging library. From version 4.2.0 to before version 12.2.0, an attacker can supply a malicious PDF that causes the process to hang indefinitely, consuming 100% CPU and making the application unresponsive. This issue has been patched in version 12.2.0.
AI Analysis
Technical Summary
The vulnerability CVE-2026-42310 in the Pillow library is a loop with an unreachable exit condition (CWE-835) that can be triggered by an attacker supplying a crafted PDF file. This causes the process to enter an infinite loop, resulting in resource exhaustion (100% CPU usage) and application unavailability. The flaw affects Pillow versions from 4.2.0 through 12.1.x and was resolved in version 12.2.0.
Potential Impact
An attacker can cause a denial-of-service by making the Pillow-based application hang indefinitely and consume full CPU resources when processing a malicious PDF file. This can disrupt services relying on Pillow for image processing, leading to unresponsiveness and potential downtime.
Mitigation Recommendations
Upgrade to Pillow version 12.2.0 or later, where this infinite loop vulnerability has been fixed. No other mitigations are indicated or required as the issue is resolved by this official patch.
CVE-2026-42310: CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') in python-pillow Pillow
Description
Pillow is a Python imaging library. From version 4.2.0 to before version 12.2.0, an attacker can supply a malicious PDF that causes the process to hang indefinitely, consuming 100% CPU and making the application unresponsive. This issue has been patched in version 12.2.0.
CVSS v4.0
Score 5.1medium
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
The vulnerability CVE-2026-42310 in the Pillow library is a loop with an unreachable exit condition (CWE-835) that can be triggered by an attacker supplying a crafted PDF file. This causes the process to enter an infinite loop, resulting in resource exhaustion (100% CPU usage) and application unavailability. The flaw affects Pillow versions from 4.2.0 through 12.1.x and was resolved in version 12.2.0.
Potential Impact
An attacker can cause a denial-of-service by making the Pillow-based application hang indefinitely and consume full CPU resources when processing a malicious PDF file. This can disrupt services relying on Pillow for image processing, leading to unresponsiveness and potential downtime.
Mitigation Recommendations
Upgrade to Pillow version 12.2.0 or later, where this infinite loop vulnerability has been fixed. No other mitigations are indicated or required as the issue is resolved by this official patch.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-26T12:37:18.169Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69fec4aacbff5d8610c50500
Added to database: 05/09/2026, 05:22:50 UTC
Last enriched: 05/16/2026, 10:02:44 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 111
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.