Resource Exhaustion Vulnerability in Pillow Imaging Library
CVE-2026-112895
8.7HIGH
What is CVE-2026-112895?
Pillow, a widely used Python imaging library, is susceptible to a resource exhaustion vulnerability during PDF parsing in append operations. Specifically, the PdfParser lacks adequate cycle and duplication tracking while navigating page-tree references, leading to situations where deep or cyclic page trees can exhaust the Python stack. Attackers can exploit this by supplying specially crafted PDF files to applications utilizing 'Image.save' with enabled PDF append, potentially leading to a denial of service through uncaught RecursionErrors or excessive resource consumption. The issue is rectified in version 13.0.0 of the library.
Affected Version(s)
Pillow >= 5.1.0, < 13.0.0
