CVE Watchtower

CVE-2026-42310pillow Loop with Unreachable Exit Condition (Infinite Loop)

NVD

Vulnerability Summary

### 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
Severity Level
MEDIUM(5.5)
Published Date
May 4, 2026
Last Modified
May 13, 2026
Exploitation Status
No confirmed exploitation yet
CVE Record Status
Published
EPSS Score (30-Day)
0.01%Probability
Root Weakness (CWE)
The product contains an iteration or loop with an exit condition that cannot be reached.
CVSS v4.0 Base Metrics — Score 5.1
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
Attack VectorLocal
Attack ComplexityLow
Attack RequirementsNone
Privileges RequiredNone
User InteractionNone
Confidentiality (Vulnerable System)None
Integrity (Vulnerable System)None
Availability (Vulnerable System)Low
Confidentiality (Subsequent System)None
Integrity (Subsequent System)None
Availability (Subsequent System)None
Show CVSS v3.x metrics (score 5.5)
CVSS v3.1 Base Metrics — Score 5.5
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Attack VectorLocal
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeUnchanged
ConfidentialityNone
IntegrityNone
AvailabilityHigh

Affected & Patched Versions

Affected Versions
  • pillow >= 4.2.0, < 12.2.0
Patched Versions
No patched version published yet
Until a fix ships, reduce exposure:
  • Restrict access to the affected service or interface to trusted networks.
  • Disable the affected feature if you do not need it.
  • Watch the vendor advisory for a firmware or software update.

What to do

Fix it during your normal patch cycle. No exploitation is confirmed yet.

  1. Check whether you run pillow and which version.
  2. No patched version is listed yet. Limit access to the affected service to trusted networks, and disable the feature if you can.
  3. Subscribe to the vendor advisory so you learn when a fix ships.

Timeline

  • May 4, 2026Published
  • May 13, 2026Record last modified

Score, severity and exploitation changes are tracked from the day Watchtower started logging them.

Get notified about new pillow CVEsYou are reading CVE-2026-42310. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alerts

Data last checked: Sep 23, 2026 13:58 UTC