CVE-2026-112899
Pillow EPS rendering can be abused with large scales, causing Ghostscript CPU/ disk exhaustion.
- CVSS 6.3
- CWE-770
- Resource Management
- Remote
Pillow is a Python imaging library. In versions 2.3.0 through 12.3.0, EPS rendering does not validate the scaled image dimensions before invoking Ghostscript. Applications that process untrusted EPS or PostScript files using an application-selected scale greater than one can incur excessive Ghostscript CPU and temporary disk consumption. In versions with decompression-bomb protection, the scaled output is checked only after Ghostscript has completed rendering, allowing resource consumption beyond the configured pixel limit. The amplification depends on the scale selected by the application, not an attacker-controlled scale value. This issue is fixed in version 13.0.0.
- CWE
- CWE-770
- CVSS base score
- 6.3
- Published
- 2026-11-05
- OWASP
- A04 Insecure Design
- Orthogonal defect classification
- Timing/Serialization
- Code defect classification
- Missing Check
- Category
- Resource Management
- Subcategory
- Resource Exhaustion
- Accessibility scope
- Remote
- Impact
- Denial of Service (DoS)
- Affected component
- Pillow
- Fixed by upgrading
- Yes
Solution
Upgrade Pillow to version 13.0.0 or later.
Vulnerable code sample
from PIL import Image
def render_eps(eps_path: str, scale: float) -> Image.Image:
# VULNERABLE: unvalidated scale allows resource exhaustion
img = Image.open(eps_path)
img.load(scale=scale) # Pillow renders via Ghostscript with given scale
return imgPatched code sample
from PIL import Image
def render_eps(eps_path: str, scale: float) -> Image.Image:
# FIX: clamp scale to prevent excessive resource use
safe_scale = min(scale, 1.0)
img = Image.open(eps_path)
img.load(scale=safe_scale) # validated scale before Ghostscript invocation
return imgPublished fix
Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.
- Do not allow Ghostscript to render beyond decompression bomb (python-pillow/Pillow)
src/PIL/EpsImagePlugin.py · Ghostscript
Cite this entry
@misc{vaitp:cve2026112899,
title = {{Pillow EPS rendering can be abused with large scales, causing Ghostscript CPU/ disk exhaustion.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-112899},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-112899/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
