CVE Catalog

CVE-2026-112894

HighCVSS 8.7
Published: Translated: NVD NIST

Summary

In Pillow from 5.1.0 until 13.0.0, reserving PDF object identifiers when saving many frames with save_all enabled takes quadratic time. PdfParser.next_object_id() repeatedly rebuilds and scans all previously reserved identifiers for every object. An attacker can supply a multi-frame image, including a small APNG with a large declared frame count, to an application that converts it to a multipage PDF.

Risk Assessment

Excessive CPU consumption may cause denial of service. This poses an availability risk to applications processing images.

Recommendation

Upgrade Pillow to version 13.0.0 or later. Until then, limit processing of untrusted multi-frame images converted to PDF.

Other vulnerabilities in Pillow

See all
Original NVD description (English source)

Pillow is a Python imaging library. From 5.1.0 until 13.0.0, Pillow takes quadratic time to reserve PDF object identifiers when saving many frames with save_all enabled. PdfParser.next_object_id() repeatedly rebuilds and scans all previously reserved identifiers for every object. An attacker can supply a multi-frame image, including a small APNG with a large declared frame count, to an application that converts it to a multipage PDF. This can consume excessive CPU and deny service. This issue is fixed in version 13.0.0.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS