CVE-2026-42310: CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') in python-pillow Pillow
A vulnerability in the Pillow Python imaging library versions 4. 2. 0 up to but not including 12. 2. 0 allows an attacker to supply a malicious PDF that causes the process to enter an infinite loop. This results in the application hanging indefinitely and consuming 100% CPU, making it unresponsive. The issue is identified as CWE-835 (Loop with Unreachable Exit Condition). A fix for this vulnerability is available in Pillow version 12. 2. 0.
AI Analysis
Technical Summary
CVE-2026-42310 is a medium severity vulnerability in the Pillow library, affecting versions from 4.2.0 to before 12.2.0. The flaw is an infinite loop triggered by processing a crafted PDF file, causing the application to hang and consume full CPU resources. This denial-of-service condition arises from a loop with an unreachable exit condition (CWE-835). The vulnerability has been addressed and patched in Pillow version 12.2.0.
Potential Impact
Successful exploitation causes the affected application to become unresponsive due to an infinite loop consuming 100% CPU. This results in a denial-of-service condition, potentially disrupting services or applications relying on Pillow for PDF processing. There is no indication of privilege escalation, data corruption, or code execution from the provided data.
Mitigation Recommendations
Upgrade to Pillow version 12.2.0 or later, where this vulnerability has been patched. No other mitigation or temporary workaround is indicated. Users should verify that their environment uses a fixed version to prevent denial-of-service via malicious PDFs.
CVE-2026-42310: CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') in python-pillow Pillow
Description
A vulnerability in the Pillow Python imaging library versions 4. 2. 0 up to but not including 12. 2. 0 allows an attacker to supply a malicious PDF that causes the process to enter an infinite loop. This results in the application hanging indefinitely and consuming 100% CPU, making it unresponsive. The issue is identified as CWE-835 (Loop with Unreachable Exit Condition). A fix for this vulnerability is available in Pillow version 12. 2. 0.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-42310 is a medium severity vulnerability in the Pillow library, affecting versions from 4.2.0 to before 12.2.0. The flaw is an infinite loop triggered by processing a crafted PDF file, causing the application to hang and consume full CPU resources. This denial-of-service condition arises from a loop with an unreachable exit condition (CWE-835). The vulnerability has been addressed and patched in Pillow version 12.2.0.
Potential Impact
Successful exploitation causes the affected application to become unresponsive due to an infinite loop consuming 100% CPU. This results in a denial-of-service condition, potentially disrupting services or applications relying on Pillow for PDF processing. There is no indication of privilege escalation, data corruption, or code execution from the provided data.
Mitigation Recommendations
Upgrade to Pillow version 12.2.0 or later, where this vulnerability has been patched. No other mitigation or temporary workaround is indicated. Users should verify that their environment uses a fixed version to prevent denial-of-service via malicious PDFs.
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: 5/9/2026, 5:22:50 AM
Last enriched: 5/9/2026, 5:36:32 AM
Last updated: 5/9/2026, 6:39:59 AM
Views: 3
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.