Impact
Pillow, the Python imaging library, uses a method that scales quadratically in time when saving a multi-frame image to PDF with the save_all option. Each frame causes the library to rebuild and scan all previously reserved PDF object identifiers, so an attacker can send a deliberately crafted image with many frames, such as a small APNG declaring a large frame count, and force the application to consume large amounts of CPU. The effect is a performance degradation that can lead to a denial of service for the running process or hosting environment. This weakness is recognized as CWE-407 and CWE-770.
Affected Systems
Any Python application that uses Pillow to convert images to PDF and supports the save_all feature is affected. The flaw exists across Pillow versions 5.1.0 through 13.0.0, inclusive. Applications that process user-supplied or untrusted images are most at risk, especially those that automatically convert or render images to PDF formats.
Risk and Exploitability
The CVSS score of 8.7 indicates a high severity. Because the EPSS score is unavailable, the current exploitation probability is unclear, and it is not listed in CISA's KEV catalog. Attackers can exploit the vulnerability by supplying a crafted multi-frame image whenever the application performs a PDF save_all operation. The vulnerability provides local or remote exploitation potential depending on the context in which the Pillow library is invoked; however, no authentication or privilege escalation is required, making it a straightforward denial‑of‑service vector. Upgrading to Pillow 13.0.0 eliminates the quadratic time behavior and removes the attack surface. This flaw also falls under CWE-770, indicating a resource exhaustion weakness.
OpenCVE Enrichment
Github GHSA