Description
Pillow is a Python imaging library. From 5.1.0 until 13.0.0, Pillow can enter an infinite loop while rewriting PDF pages. PdfParser.rewrite_pages() follows Parent relationships without detecting a cycle in the page tree. An attacker can supply a cyclic PDF to an application that appends an image to that PDF. This can hold the worker at full CPU and deny service. This issue is fixed in version 13.0.0.
Published: 2026-10-19
Score: 8.7 High
EPSS: n/a
KEV: No
Impact: Denial of Service
Action: Apply Patch
AI Analysis

Impact

The flaw exists in Pillow's PdfParser.rewrite_pages method, causing an infinite loop when it encounters a page tree with a circular Parent reference. An attacker crafting a cyclic PDF and feeding it to an application that uses Pillow to append an image can trigger the loop, consuming the worker's CPU indefinitely and effectively denying service.

Affected Systems

Affected vendors: Python Pillow. The issue spans versions 5.1.0 through 13.0.0 inclusive. Versions 13.0.0 and later include the fix, as indicated by the release notes and security advisory.

Risk and Exploitability

The CVSS score of 8.7 indicates high severity. Without a published EPSS score, the probability of exploitation remains unknown, but since the flaw leads to a full‑CPU loop, it is likely to be a local or application‑level DoS. The vulnerability is not currently listed in the CISA KEV catalog. An application processing user‑supplied PDFs—such as document management or image editing tools that use Pillow—could be targeted; the attacker must provide a malicious PDF that triggers the cycle.

Generated by OpenCVE AI on October 20, 2026 at 00:40 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Pillow to version 13.0.0 or later where the infinite loop is fixed.
  • Implement input validation to detect circular Parent references in PDFs before invoking Pillow's rewrite_pages, or use an external library to sanitize PDFs.
  • Add a watchdog or CPU quota to PDF processing tasks to prevent a single process from monopolizing system resources.

Generated by OpenCVE AI on October 20, 2026 at 00:40 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 19 Oct 2026 22:45:00 +0000

Type Values Removed Values Added
First Time appeared Python-pillow
Python-pillow pillow
Vendors & Products Python-pillow
Python-pillow pillow

Mon, 19 Oct 2026 21:45:00 +0000

Type Values Removed Values Added
Description Pillow is a Python imaging library. From 5.1.0 until 13.0.0, Pillow can enter an infinite loop while rewriting PDF pages. PdfParser.rewrite_pages() follows Parent relationships without detecting a cycle in the page tree. An attacker can supply a cyclic PDF to an application that appends an image to that PDF. This can hold the worker at full CPU and deny service. This issue is fixed in version 13.0.0.
Title Pillow: Infinite loop in PdfParser.rewrite_pages on page tree Parent cycle
Weaknesses CWE-835
References
Metrics cvssV4_0

{'score': 8.7, 'vector': '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'}


Subscriptions

Python-pillow Pillow
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-19T21:31:49.946Z

Reserved: 2026-10-19T16:58:51.960Z

Link: CVE-2026-112406

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-19T22:17:08.153

Modified: 2026-10-19T22:17:08.153

Link: CVE-2026-112406

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-20T00:45:06Z

Weaknesses
  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')