Inefficient Algorithmic Complexity in Pillow - CVE-2026-112891

 

Inefficient Algorithmic Complexity in Pillow - CVE-2026-112891

Published: November 3, 2026


Vulnerability identifier: #VU158887
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-112891
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 through excessive CPU consumption.

The vulnerability exists due to inefficient algorithmic complexity in Pillow's _get_global_header() function when saving GIF images containing long comments. A remote attacker can submit a crafted image with a long comment to a service that automatically resaves uploaded images as GIFs to trigger repeated copying of comment data with quadratic processing cost and cause a denial of service.


Affected software

Pillow

How to mitigate CVE-2026-112891

Install security update from vendor's website.

Pillow - update to 13.0.0

External References

Related Security Bulletins