Infinite loop in Pillow - CVE-2026-112406
Published: November 22, 2026
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
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
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