CVE-2026-112895
Received Received - Intake

Pillow PDF Parsing Resource Exhaustion Vulnerability

Vulnerability report for CVE-2026-112895, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-19

Last updated on: 2026-10-19

Assigner: GitHub, Inc.

Description

Pillow is a Python imaging library. From 5.1.0 until 13.0.0, Pillow can exhaust resources while parsing an existing PDF during an append operation. PdfParser follows page-tree child references without cycle or duplication tracking and follows previous-trailer chains with only an exact repeated-offset guard, so deep or cyclic page trees and long chains of unique trailer offsets can exhaust the Python stack. Repeated non-cyclic /Kids references can also cause super-linear CPU and memory use. An attacker can supply such a PDF to an application that calls Image.save with PDF append enabled. This can raise an uncaught RecursionError or consume excessive CPU and memory before output is written, causing denial of service. This issue is fixed in version 13.0.0.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-19
Last Modified
2026-10-19
Generated
2026-10-20
AI Q&A
2026-10-20
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
python-pillow Pillow >= 5.1.0, < 13.0.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-674 The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

Pillow is a Python imaging library. From versions 5.1.0 to 13.0.0, it can exhaust system resources while parsing a PDF during an append operation. The vulnerability occurs because the PDF parser follows page-tree child references without tracking cycles or duplications, and follows previous-trailer chains with limited protection. This allows deep or cyclic page trees and long chains of unique trailer offsets to exhaust the Python stack. Attackers can exploit this by supplying a specially crafted PDF to an application using Image.save with PDF append enabled, causing denial of service through excessive CPU, memory use, or uncaught RecursionError.

Detection Guidance

Detecting this vulnerability requires checking for outdated Pillow versions (5.1.0 to 13.0.0) and monitoring for unusual CPU or memory usage during PDF processing. Inspect installed Pillow versions using 'pip show Pillow' or 'pip list | grep Pillow'. Test PDF parsing with 'python -c "from PIL import Image; Image.open('test.pdf').save('output.pdf', append=True)"' to observe resource exhaustion.

Impact Analysis

If you use an affected version of Pillow (5.1.0 to 13.0.0) in an application that processes PDFs with append operations, an attacker could supply a malicious PDF to crash your application, consume excessive system resources, or slow down your system. This could lead to denial of service, disrupting normal operations of your application or services relying on it.

Mitigation Strategies

Upgrade Pillow to version 13.0.0 or later immediately. If upgrading is not possible, disable PDF append operations in applications using Pillow or restrict PDF processing to trusted sources. Monitor system resources during PDF operations for signs of excessive CPU or memory usage.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-112895. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart