Impact
Pillow, the Python imaging library, copies parts of an image's GIF comment data repeatedly while assembling the global header during a save operation. With versions 9.2.0 through 12.x, an attacker can include a very large comment in an input GIF; the library then performs quadratic copying, expending excessive CPU cycles and potentially delaying or denying service to the application. This weakness is classified as CWE-407, unnecessary computation that can be exploited for denial of service.
Affected Systems
Python‑Pillow’s Pillow library, versions 9.2.0 up to (but not including) 13.0.0, are affected. Version 13.0.0 contains the fix.
Risk and Exploitability
The CVSS score of 6.9 indicates moderate severity, and with no EPSS data the probability of exploitation is unknown. The issue is not listed in the CISA KEV catalog. An application that accepts user‑supplied images and saves them as GIFs can be targeted by an attacker who uploads an image with an oversized GIF comment; during the save operation Pillow will consume large amounts of CPU, which can slow or halt the service. Vulnerable code resides in _get_global_header(), meaning that any client facing image processing workflow that calls Pillow's save function is at risk, assuming the attacker can supply the image.
OpenCVE Enrichment