Inefficient Algorithmic Complexity in Pillow - CVE-2026-112894

 

Inefficient Algorithmic Complexity in Pillow - CVE-2026-112894

Published: November 22, 2026


Vulnerability identifier: #VU169369
CSH Severity: Medium
CVSS v4: 6.9 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-112894
CWE-ID: CWE-407
Exploitation vector: Remote access
Exploit availability: No public exploit available

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

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-112894

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