Inefficient Algorithmic Complexity in Pillow - CVE-2026-112894
Published: November 22, 2026
Vulnerability details
The vulnerability allows a remote attacker to cause a denial of service by consuming excessive CPU time in an image-to-PDF conversion worker.
The vulnerability exists due to quadratic-time object ID allocation in Pillow's PDF writer when saving all frames as a multi-page PDF, because the allocator rebuilds and scans the set of reserved IDs for each new ID. A remote attacker can submit an image for multi-page PDF conversion to trigger excessive processing based on its actual or declared frame count.
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-112894
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