CVE-2026-112894: Pillow: Quadratic-time DoS in PDF save_all (PdfParser.next_object_id)

Published Oct 19, 2026
·
Updated

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 saveall enabled. PdfParser.nextobjectid() 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.

Affected Software

1 affected component
pypi/Pillow>=5.1.0<13.0.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Pillow to a version that resolves this vulnerability.

    Fixed in 13.0.0

Event History

Oct 19, 2026
CVE Published
via MITRE·09:55 PM
Data Sourced
via MITRE·09:55 PM
DescriptionWeakness
Data Sourced
via NVD·10:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are exposed to this denial-of-service issue?

Applications using Pillow to convert untrusted multi-frame images into multipage PDFs with save_all enabled are exposed. An attacker can provide a multi-frame image, including a small APNG that declares a large number of frames, to drive excessive CPU consumption.

2

Does exploitation require authentication or user interaction?

No. The CVSS vector indicates network exploitation with low attack complexity, no privileges required, and no user interaction; the vulnerable application must process attacker-supplied input through the affected PDF conversion path.

3

Which Pillow versions are affected, and what version fixes the issue?

Pillow versions from 5.1.0 up to, but not including, 13.0.0 are affected. The issue is fixed in Pillow 13.0.0.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203