Inefficient regular expression complexity in Pillow - CVE-2026-112901
Published: November 3, 2026
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.