Impact
Pillow is a widely used Python imaging library. Before version 12.3.0, the GdImageFile._open method read image dimensions from the GD 2.x header and stored them in the internal _size attribute without calling Image._decompression_bomb_check(). This oversight allows a crafted .gd file to declare an exaggerated size, causing Pillow to allocate excessive C‑heap memory when the file is opened. The resulting memory exhaustion can crash the Pillow‑enabled process or exhaust system memory, leading to a denial‑of‑service condition. The weakness aligns with logic or state management failure (CWE‑1285) and out‑of‑bounds memory allocation (CWE‑789).
Affected Systems
All installations of the Pillow library prior to version 12.3.0 that employ the GdImageFile class to load GD (Graphics Draw) image files are affected. Because Pillow runs on any platform that supports Python, the vulnerability is platform‑agnostic and can impact any application that processes .gd images using Pillow.
Risk and Exploitability
The CVSS score of 7.5 indicates a high severity vulnerability, while an EPSS score of less than 1% reflects a very low but non‑zero likelihood of exploitation. The issue is not currently listed in the CISA KEV catalog. Based on the description, it is inferred that an attacker must provide a malicious .gd file to a Pillow‑enabled application; if the application accepts user uploads, network delivery is possible, or otherwise the file may be supplied locally. The ensuing excessive memory allocation may crash the process or render the application unresponsive, delivering a denial‑of‑service impact with no privilege escalation or data exfiltration.
OpenCVE Enrichment
Github GHSA