Skip to main content

CVE-2026-112406: CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') in python-pillow Pillow

0
High
VulnerabilityCVE-2026-112406cvecve-2026-112406cwe-835
Published: 10/19/2026 (10/19/2026, 21:31:49 UTC)
Source: CVE Database V5
Vendor/Project: python-pillow
Product: 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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Affected software

python-pillow

Pillow

Affected versions
>=5.1.0 <13.0.0
pillow
pkg:pypi/pillow

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/19/2026, 22:03:34 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses