CVE-2026-112901 is a ReDoS (regular expression denial of service) vulnerability in Pillow's XBM image plugin. The root cause is the module-level xbm_head regular expression in src/PIL/XbmImagePlugin.py, which contains several adjacent quantifier pairs that can match the same characters: [ \t]+ overlaps with .* (width/height lines) and with [^_]* (hotspot lines), and [\r\n]+ closing the optional hotspot group overlaps with the following [\000-\377]*. A crafted 512-byte header that sets up runs of spaces/line-terminators and then omits the [] after _bits forces Python's backtracking regex engine to try every way of splitting those runs and rescan the remaining bytes each time, resulting in O(k^5) work (about 6 minutes of CPU for k=60). The vulnerable function is XbmImageFile._open(), which is the sole call site of xbm_head.match(self.fp.read(512)). This runs before any format is identified, so none of Pillow's size/pixel-count/decompression-bomb limits apply. The _accept() hook is the gate that routes any '#define'-prefixed stream into this plugin. The fix (commit 2852a3e3d568997ddec745fc800991f138878f4b) replaced the regex entirely with a line-by-line parser, eliminating the catastrophic backtracking. For Python profilers, functions are shown as Class.function_name (module path is stripped), so the vulnerable function appears as XbmImageFile._open.