Impact
A quadratic concatenation bug in Pillow’s GIF comment parsing causes the library to repeatedly append immutable byte strings for each comment sub-block. An attacker can craft a small‑dimension GIF with many comment extensions that forces the parser to perform an exponential amount of work before Image.open() returns, consuming CPU and potentially bringing the host application to a halt before any image metadata is inspected. The flaw is a classic denial of service rather than a code‑execution issue, and it is linked to CWE‑407, Improper Resource Management.
Affected Systems
The issue affects the Python Pillow imaging library, with all releases from 5.4.0 through 13.0.0 inclusive. Installation of Pillow by name python-pillow:Pillow triggers the vulnerability during Image.open() of GIF files. The vulnerability is mitigated in Pillow 13.0.0 and later.
Risk and Exploitability
The CVSS base score of 6.9 indicates moderate severity, and the EPSS score is not available, so the current exploitation probability is unknown. The vulnerability is not listed in CISA’s KEV catalog, but the vulnerability can be exploited by any Python application that imports Pillow and processes GIF images, without requiring elevated privileges or special network exposure. The attack vector is inferred to be local or remote upload of a crafted GIF to any service using Pillow for image handling.
OpenCVE Enrichment