CVE-2026-42310: Pillow: PDF Parsing Trailer Infinite Loop (DoS)

Published May 4, 2026
·
Updated

### Impact An attacker can supply a malicious PDF that causes the process to hang indefinitely, consuming 100% CPU and making the application unresponsive. ### Patches Patched version: 12.2.0. PdfParser (introduced in Pillow 4.2.0) follows Prev pointers in PDF trailers to read cross-reference sections. If a trailer's Prev pointer references an offset that has already been processed — either pointing to itself or forming a longer cycle — the parser enters an infinite loop. Pillow now tracks previously processed trailer offsets and raises an error if a cycle is detected. ### Workarounds Use any version but the affected versions: >= 4.2.0, < 12.2.0 ### Resources - Fix: https://github.com/python-pillow/Pillow/pull/9519

Affected Software

2 affected componentsFixes available
pip/pillow>=4.2.0<12.2.0
12.2.0
Python Pillow>=4.2.0<12.2.0

Event History

May 4, 2026
Advisory Published
via GitHub·08:19 PM
Data Sourced
via GitHub·08:19 PM
DescriptionWeaknessAffected Software
May 9, 2026
CVE Published
via MITRE·04:10 AM
Data Sourced
via MITRE·04:10 AM
DescriptionWeakness
Data Sourced
via NVD·06:16 AM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-42310?

CVE-2026-42310 is considered a high severity vulnerability due to its potential to render applications unresponsive.

2

How do I fix CVE-2026-42310?

To fix CVE-2026-42310, you should upgrade to version 12.2.0 or later of the Pillow library.

3

What type of attack is associated with CVE-2026-42310?

CVE-2026-42310 is associated with a denial-of-service attack caused by a malicious PDF file.

4

Which software versions are affected by CVE-2026-42310?

CVE-2026-42310 affects versions of Pillow from 4.2.0 up to, but not including, 12.2.0.

5

What happens when an application is exploited using CVE-2026-42310?

When exploited, an application hangs indefinitely, consuming 100% CPU and becoming unresponsive.

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