CVE-2026-42310: Pillow: PDF Parsing Trailer Infinite Loop (DoS)
### 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
Remediation
Patch Available
Event History
Frequently Asked Questions
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.
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.
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.
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.
What happens when an application is exploited using CVE-2026-42310?
When exploited, an application hangs indefinitely, consuming 100% CPU and becoming unresponsive.