CVE-2026-112406: CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') in python-pillow Pillow
Description
Pillow, a Python imaging library, contains a vulnerability in versions from 5.1.0 up to but not including 13.0.0 where it can enter an infinite loop when rewriting PDF pages. The issue arises because PdfParser.rewrite_pages() follows Parent relationships in the PDF page tree without detecting cycles, allowing a crafted cyclic PDF to cause a denial of service by consuming full CPU. This vulnerability has a high severity score and is fixed in version 13.0.0.
CVSS v4.0
Score 8.7high
Affected software
python-pillow
Pillow
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 in Pillow (CVE-2026-112406) involves an infinite loop caused by the PdfParser.rewrite_pages() function following Parent relationships in a PDF page tree without cycle detection. This flaw exists in versions >=5.1.0 and <13.0.0. An attacker can exploit this by supplying a cyclic PDF to an application that appends images to PDFs, resulting in a denial of service due to high CPU usage. The issue is resolved in Pillow version 13.0.0.
Potential Impact
An attacker can cause a denial of service by supplying a cyclic PDF that triggers an infinite loop in the PdfParser.rewrite_pages() function, leading to full CPU utilization and potentially halting the affected application or service. There is no indication of privilege escalation, data disclosure, or code execution from this vulnerability.
Mitigation Recommendations
Upgrade Pillow to version 13.0.0 or later, where this infinite loop vulnerability is fixed. No other mitigations are specified or required.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-10-19T16:58:51.960Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6ad6905d2cdf04f65694f771
Added to database: 10/19/2026, 21:49:17 UTC
Last enriched: 10/19/2026, 22:03:34 UTC
Last updated: 10/19/2026, 22:08:23 UTC
Views: 6
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.