Skip to main content

Pillow EUVDEUVD-2026-104601

| CVE-2026-112391 MEDIUM
Loop with Unreachable Exit Condition (Infinite Loop) (CWE-835)
2026-10-19 GitHub_M GHSA-254f-3936-288h
6.3
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify app using Pillow PDF append on untrusted input
  2. Delivery
    Submit deeply nested malicious PDF
  3. Exploit
    Trigger unbounded recursion in PdfParser.get_value
  4. Execution
    Uncaught RecursionError crashes worker
  5. Impact
    Denial of service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Loop termination conditions
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the target application to save an image using Pillow's PDF append mode (opening an existing PDF for append) where that existing PDF is attacker-controlled or attacker-influenced; the malicious input is a deeply nested PDF object graph (nested arrays/dictionaries) that drives PdfParser.get_value()/read_indirect() past the recursion limit. Limiting factors: the vulnerable path is NOT reached by default image operations - the application must explicitly use PDF append on untrusted input, and impact is confined to a crash/worker termination (availability only) with no RCE, data exposure, or integrity impact. Affected versions are Pillow 5.1.0 up to (not including) 13.0.0.

Impact

This is a genuine but modest-priority issue, not a top-tier emergency. The provided CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N) scores 6.3 (Medium) with impact limited strictly to availability (VA:L; VC:N/VI:N) - consistent with CWE-835 unbounded recursion causing a RecursionError or worker termination. There is no confidentiality or integrity impact and no code execution. No EPSS score, KEV listing, or SSVC decision data was supplied, and no standalone public exploit was referenced - the only 'exploit' signal is a published fix (GHSA-254f-3936-288h plus commit 94cb11c and the 13.0.0 release) that includes a regression test demonstrating the crash pattern, which is a proof of the bug rather than a weaponized exploit. The AT:P ('attack requirement present') metric is the key moderating signal: exploitation is only possible when the consuming application saves an image with PDF append enabled against an attacker-influenced existing PDF, so this is not a drive-by condition despite the AV:N network vector. Net: a real, low-privilege, network-reachable DoS gated by a specific application configuration - patch on a normal cycle, prioritize only if you knowingly run Pillow PDF append on untrusted input.

Exploit ScenarioDerived

An application uses Pillow to append a new page/image to an existing PDF (PDF append mode) where the base PDF is supplied or influenced by an untrusted user. The attacker submits a PDF containing deeply nested arrays/dictionaries (e.g., ~1000 levels of '[' ... ']'); when PdfParser.get_value()/read_indirect() recurses without a limit, the worker raises an uncaught RecursionError and crashes, denying service. No public exploit is identified, but the fix's regression test shows the exact crafted-input pattern.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 19, 2026

Unbounded recursion in Pillow's PDF parser (versions 5.1.0 through 12.x) can crash a Python worker when an application opens an attacker-supplied PDF for append, producing availability-only denial of service. The issue is reachable only when the application explicitly uses Pillow's PDF append mode on untrusted input; the independent assessment rates it as a modest-priority availability issue, not a top-tier emergency, and no public exploit has been identified at time of analysis. Pillow 13.0.0 fixes the problem by capping parser nesting depth.

RemediationAI

Vendor-released patch: upgrade to Pillow 13.0.0, which caps parser nesting depth at 900 by default. The fix commit is https://github.com/python-pillow/Pillow/commit/94cb11c44ff7345414da17ebfea1598a529ad9cd and the advisory is https://github.com/python-pillow/Pillow/security/advisories/GHSA-254f-3936-288h. If immediate upgrade is not possible, do not enable PDF append mode when processing untrusted PDFs; validate or reject PDFs with excessive object nesting before passing them to Pillow; and run conversion workers in isolated processes with recursion, memory, and timeout limits so a RecursionError terminates only the sandboxed worker. Trade-offs: disabling append removes legitimate PDF-append workflows, input validation may reject complex but valid PDFs, and process isolation adds operational overhead while limiting the blast radius of a crash.

Affected VersionsENISA

Pillow 5.1.0, < 13.0.0

Affected Packages

pypi pillow fix: 13.0.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Pillow is a widely used Python imaging library. Its PdfParser reads PDF object graphs, and PdfParser.get_value() recursively follows arrays and dictionaries. In affected versions, get_value() and read_indirect() defaulted max_nesting to -1, effectively disabling the recursion-depth guard; a deeply nested PDF object graph can therefore drive the parser past Python's recursion limit and raise an uncaught RecursionError. The commit changes both defaults to 900 and adds a regression test using 1,000 nested arrays. This maps to CWE-835, a loop or recursive path with no effective exit condition, but the practical impact here is availability only: no code execution, data disclosure, or integrity impact. The vulnerable path is not reached by ordinary image operations; it requires an application to open an existing, attacker-controlled PDF for append. The supplied CPE identifies python-pillow:pillow broadly, while the vendor advisory narrows the affected range to 5.1.0 through versions before 13.0.0.

Know when Pillow gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 6.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
vuln.today AI 5.3 MEDIUM

Attacker-supplied PDF is processed over the network path with no auth or interaction (AV:N/AC:L/PR:N/UI:N); impact is a worker-crash DoS only (A:L, C/I:N), gated application-side by PDF-append mode.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Oct 19, 2026 - 22:03 EUVD
CVE Published
Oct 19, 2026 - 20:40 cve.org
MEDIUM 6.3

DescriptionCVE.org

Pillow is a Python imaging library. From 5.1.0 until 13.0.0, Pillow's PdfParser.get_value() can recurse without a limit while reading nested PDF objects. The parser follows attacker-controlled arrays and dictionaries when an existing PDF is opened for append. An attacker can provide a deeply nested PDF to an application that saves an image with PDF append enabled. This can raise an uncaught RecursionError or terminate the worker, causing denial of service. This issue is fixed in version 13.0.0.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 21 pypi packages depend on pillow (15 direct, 6 indirect)

Ecosystem-wide dependent count for version 5.1.0.

Threat Intelligence Overview

EPSS Score
0.3%
Top 80% exploitable
Prevalence
High
Pillow is among the most widely deployed Python imaging libraries in production
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Pillow

View all
CVE-2022-30595 CRITICAL POC
9.8 May 25

libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files. Rated

CVE-2026-59204 HIGH POC
8.7 Jul 14

Denial of service in Python Pillow (versions 8.2.0 through 12.2.0) allows remote attackers to exhaust memory during JPEG

CVE-2026-54058 HIGH POC
8.3 Jul 14

Out-of-bounds memory disclosure in Python Pillow before 12.3.0 lets an attacker who supplies a crafted McIdas AREA image

CVE-2026-59197 HIGH POC
8.2 Jul 14

Heap out-of-bounds write in Python Pillow prior to 12.3.0 lets an attacker who controls the rank-filter size parameter c

CVE-2026-59200 HIGH POC
7.5 Jul 14

Uncontrolled memory consumption in Python Pillow (PIL) versions 5.1.0 through 12.2.x allows a remote attacker to cause d

CVE-2021-23437 HIGH POC
7.5 Sep 03

The package pillow 5.2.0 and before 8.3.2 are vulnerable to Regular Expression Denial of Service (ReDoS) via the getrgb

CVE-2025-48379 HIGH POC
7.1 Jul 01

Pillow is a Python imaging library. In versions 11.2.0 to before 11.3.0, there is a heap buffer overflow when writing a

CVE-2016-4009 CRITICAL
9.8 Apr 13

Integer overflow in the ImagingResampleHorizontal function in libImaging/Resample.c in Pillow before 3.1.1 allows remote

CVE-2014-3007 CRITICAL
10.0 Apr 27

Python Image Library (PIL) 1.1.7 and earlier and Pillow 2.3 might allow remote attackers to execute arbitrary commands v

CVE-2026-96639 CRITICAL
9.8 Oct 21

Pillow versions 11.0.0 through 12.x (fixed in 13.0.0) can reuse a stale native ImagingCore buffer when a multi-frame ima

CVE-2021-34552 CRITICAL
9.8 Jul 13

Pillow through 8.2.0 and PIL (aka Python Imaging Library) through 1.1.7 allow an attacker to pass controlled parameters

CVE-2021-25289 CRITICAL
9.8 Mar 19

An issue was discovered in Pillow before 8.1.1. Rated critical severity (CVSS 9.8), this vulnerability is remotely explo

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy