Vulnerability · Published May 9, 2026 · Assigned by GitHub_M
CVE-2026-42310Pillow: PDF Parsing Trailer Infinite Loop (DoS)
Medium 5.1
In plain English
A medium-severity infinite loop in Pillow from python-pillow. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 7% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Severity (CVSS 4.0)5.1Medium
Exploit odds (30 days)0.2%top 93.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | pillow | no fix listed | DEBIAN-CVE-2026-42310 |
| Debian:13 | pillow | 11.1.0-5+deb13u3 | DEBIAN-CVE-2026-42310 |
| Debian:14 | pillow | 12.2.0-1 | DEBIAN-CVE-2026-42310 |
| PyPI | pillow | 12.2.0 | PYSEC-2026-2874 |
| PyPI | pillow | 12.2.0 | GHSA-r73j-pqj5-w3x7 |
| Ubuntu:22.04:LTS | pillow | 9.0.1-1ubuntu0.4 | USN-8399-1 |
| Ubuntu:22.04:LTS | pillow | 9.0.1-1ubuntu0.4 | UBUNTU-CVE-2026-42310 |
| Ubuntu:24.04:LTS | pillow | 10.2.0-1ubuntu1.2 | USN-8399-1 |
| Ubuntu:24.04:LTS | pillow | 10.2.0-1ubuntu1.2 | UBUNTU-CVE-2026-42310 |
| Ubuntu:25.10 | pillow | 11.3.0-1ubuntu1.3 | USN-8399-1 |
| Ubuntu:25.10 | pillow | 11.3.0-1ubuntu1.3 | UBUNTU-CVE-2026-42310 |
| Ubuntu:26.04:LTS | pillow | 12.1.1-2ubuntu1.2 | UBUNTU-CVE-2026-42310 |
| Ubuntu:26.04:LTS | pillow | 12.1.1-2ubuntu1.2 | USN-8399-1 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| python-pillow | Pillow | >= 4.2.0, < 12.2.0 |
Weakness: CWE-835 · Vector: CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
References
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-r73j-pqj5-w3x7 x_refsource_CONFIRM
- https://github.com/python-pillow/Pillow/pull/9519 x_refsource_MISC
- https://github.com/python-pillow/Pillow/commit/3bf614e4b8615d0ce1d5039efaf6db447fe7c468 x_refsource_MISC
- https://github.com/python-pillow/Pillow/releases/tag/12.2.0 x_refsource_MISC