What’s Vulnerable › Vulnerabilities
CVE-2026-42310: Pillow: PDF Parsing Trailer Infinite Loop (DoS)
- Severity: medium (CVSS 5.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-05-09 · updated 2026-07-24
- Weakness: CWE-835
Description
Pillow is a Python imaging library. From version 4.2.0 to before version 12.2.0, an attacker can supply a malicious PDF that causes the process to hang indefinitely, consuming 100% CPU and making the application unresponsive. This issue has been patched in version 12.2.0.
Affected products
- python-pillow Pillow: from 4.2.0 before 12.2.0 — fixed in 12.2.0
- Pypi Pillow: from 4.2.0 before 12.2.0; 10.0.0, 10.0.1, 10.1.0, 10.2.0, 10.3.0, 10.4.0 (+45) — fixed in 12.2.0
How to fix
Upgrade to a fixed version: python-pillow Pillow 12.2.0; Pypi Pillow 12.2.0. Check the vendor advisory for mitigations.
References
- https://github.com/python-pillow/Pillow/commit/3bf614e4b8615d0ce1d5039efaf6db447fe7c468
- https://github.com/python-pillow/Pillow/pull/9519
- https://github.com/python-pillow/Pillow/releases/tag/12.2.0
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-r73j-pqj5-w3x7
Get alerted when CVE-2026-42310 or the next vulnerability affects your stack