Infinite loop in Pillow - CVE-2026-112406

 

Infinite loop in Pillow - CVE-2026-112406

Published: November 22, 2026


Vulnerability identifier: #VU169371
CSH Severity: Medium
CVSS v4: 6.7 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-112406
CWE-ID: CWE-835
Exploitation vector: Local access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to cause a denial of service by hanging a PDF append worker indefinitely.

The vulnerability exists due to missing cycle detection in Pillow's PdfParser.rewrite_pages() when traversing page-tree parent references during a PDF append operation. A remote attacker can supply a specially crafted PDF to an application that appends pages to it to trigger an infinite loop that occupies one CPU core.


Affected software

Pillow
Anolis OS
Ubuntu
python3-pil (Ubuntu package)
python-pil (Ubuntu package)
python3-pillow
python3-pillow-devel
python3-pillow-tk
python3-pillow-doc
python3-pillow-qt

How to mitigate CVE-2026-112406

Install security update from vendor's website.

Pillow - update to 13.0.0
python3-pil (Ubuntu package) - addressed in versions 5.1.0-1ubuntu0.8+esm3, 7.0.0-4ubuntu0.9+esm2, 9.0.1-1ubuntu0.7, 10.2.0-1ubuntu1.5, 12.1.1-2ubuntu1.5, 12.3.0-1ubuntu2
python-pil (Ubuntu package) - update to 5.1.0-1ubuntu0.8+esm3
python3-pillow - addressed in versions 5.1.1-33, 13.0.0-1
python3-pillow-devel - addressed in versions 5.1.1-33, 13.0.0-1
python3-pillow-tk - addressed in versions 5.1.1-33, 13.0.0-1
python3-pillow-doc - addressed in versions 5.1.1-33, 13.0.0-1
python3-pillow-qt - update to 13.0.0-1

External References

Related Security Bulletins