CVE-2026-112406: High severity pypi/Pillow vulnerability

Published Oct 19, 2026
·
Updated

Pillow is a Python imaging library. From 5.1.0 until 13.0.0, Pillow can enter an infinite loop while rewriting PDF pages. PdfParser.rewritepages() follows Parent relationships without detecting a cycle in the page tree. An attacker can supply a cyclic PDF to an application that appends an image to that PDF. This can hold the worker at full 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 NVD·10:17 PM
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 append an image to attacker-supplied PDF files are exposed. The affected operation is PDF page rewriting through PdfParser.rewrite_pages().

2

What must an attacker provide to trigger the issue?

An attacker must supply a PDF whose page tree contains a cyclic Parent relationship. Processing that PDF in the affected image-append workflow can cause an infinite loop and keep a worker at full CPU.

3

Are default Pillow installations affected?

The issue affects Pillow versions from 5.1.0 up to, but not including, 13.0.0 when the application performs the affected PDF rewriting workflow. The provided information does not establish that all default uses of Pillow invoke this path.

4

What is the remediation?

Upgrade Pillow to version 13.0.0, which fixes the issue. If upgrading cannot happen immediately, avoid appending images to untrusted PDF inputs to prevent the vulnerable page-rewriting path from processing malicious files.

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