Inefficient regular expression complexity in Pillow - CVE-2026-112901

 

Inefficient regular expression complexity in Pillow - CVE-2026-112901

Published: November 3, 2026


Vulnerability identifier: #VU158889
CSH Severity: Medium
CVSS v4: 8.7 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-112901
CWE-ID: CWE-1333
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 in applications that process images with Pillow.

The vulnerability exists due to inefficient regular expression complexity in the xbm_head expression used by XbmImageFile._open() when identifying image streams. A remote attacker can submit a crafted 512-byte file containing four #define lines with long whitespace runs and an _bits suffix without the required [] to trigger excessive backtracking, occupying a processor core for several minutes per file and potentially exhausting application workers.


Affected software

Pillow

How to mitigate CVE-2026-112901

Install security update from vendor's website.

Pillow - update to 13.0.0

External References

Related Security Bulletins