Vulnerability DatabaseCVE-2026-112899

CVE-2026-112899: 
Python vulnerability analysis and mitigation

Overview

CVE-2026-112899 is a denial-of-service vulnerability in Pillow (Python Imaging Library) where EPS rendering does not validate scaled image dimensions before invoking Ghostscript. Affecting versions 2.3.0 through 12.3.0, the flaw allows applications processing untrusted EPS or PostScript files with a scale factor greater than one to incur excessive Ghostscript CPU consumption and temporary disk usage. The vulnerability was published on October 17, 2026, and fixed in Pillow 13.0.0. It carries a CVSS v3.1 base score of 5.3 (Medium) and a CVSS v4.0 base score of 6.3 (Medium) (Github Advisory, Pillow Advisory).

Technical details

The root cause is classified as CWE-770 (Allocation of Resources Without Limits or Throttling). In src/PIL/EpsImagePlugin.py, the Ghostscript() function multiplies the file-declared image dimensions by the caller-supplied scale factor (width = size[0] * scale, height = size[1] * scale) and passes the product directly to Ghostscript via the -g geometry argument, without first calling Image._decompression_bomb_check() on the scaled dimensions. The decompression-bomb check only runs after Ghostscript has completed rendering and written the full raw PNM output to a temporary file. As a result, a ~110-byte EPS file declaring a 9000×9000 bounding box (81 Mpixels, just below the default MAX_IMAGE_PIXELS limit of ~89.5 Mpixels) passes Image.open() unimpeded, but im.load(scale=2) instructs Ghostscript to render an 18000×18000 image (324 Mpixels, 3.6× the limit), producing a ~972 MB temporary file before any limit is enforced. The amplification factor is N² per request, where N is the integer scale chosen by the application, not the attacker (Pillow Advisory, Fix PR).

Impact

Successful exploitation degrades or blocks service availability by exhausting Ghostscript CPU cycles and temporary disk space on the host. A single ~110-byte malicious EPS upload can cause each processing request to consume N² times the intended Ghostscript rendering budget and write multi-gigabyte temporary files (e.g., ~972 MB at scale=2, ~2.2 GB at scale=3, ~8.6 GB at scale=4). There is no confidentiality or integrity impact, no memory corruption, and no lateral movement potential; Pillow's in-process pixel allocation remains bounded because the decompression-bomb check fires after Ghostscript completes. The vulnerability is limited to applications that accept untrusted EPS/PS files and invoke load(scale=N) with N > 1 while Ghostscript is installed (Pillow Advisory).

Exploitability

A proof-of-concept reproducer is publicly available in the GitHub Security Advisory; it stubs out Ghostscript and demonstrates that a 76-byte EPS file causes Pillow to construct a Ghostscript geometry argument of -g18000x18000 (3.6× MAX_IMAGE_PIXELS) without triggering any decompression-bomb check beforehand (Pillow Advisory). The EPSS score is approximately 0.54% (47th percentile), indicating a low but non-negligible probability of exploitation in the wild. No in-the-wild exploitation has been reported, and the vulnerability is not listed in the CISA KEV catalog. Exploitation is not fully automatable (SSVC: automatable: no) because it requires the target application to call load(scale=N) with N > 1 on attacker-supplied EPS files (Github Advisory).

Exploitation steps

  1. Craft a malicious EPS file: Create a minimal EPS file (~76–111 bytes) declaring a bounding box just below Pillow's MAX_IMAGE_PIXELS limit (e.g., %%BoundingBox: 0 0 9000 9000, representing 81 Mpixels):
%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 9000 9000
%%EndComments
showpage
  1. Upload the file: Submit the crafted EPS to a target application that accepts untrusted EPS/PostScript uploads and processes them with Pillow.
  2. Trigger scaled rendering: The application calls im.load(scale=2) (or higher) on the opened EPS, which is the documented method for higher-resolution rasterization. Pillow computes width=18000, height=18000 and passes -g18000x18000 to Ghostscript without a pre-render size check.
  3. Resource exhaustion: Ghostscript renders the 324-Mpixel image and writes a ~972 MB PNM temporary file to disk, consuming significant CPU and disk I/O. Repeating this across multiple concurrent requests amplifies the denial-of-service effect.
  4. Observe impact: The DecompressionBombError fires only after Ghostscript finishes, meaning resources are already consumed. Service degradation or worker exhaustion results (Pillow Advisory).

Indicators of compromise

  • File System: Unusually large temporary files (hundreds of MB to several GB) with .pnm or random names in the system temp directory (e.g., /tmp/tmpXXXXXX) created by the Ghostscript process.
  • Process: Repeated or long-running gs (Ghostscript) child processes spawned by the application's Python process, consuming high CPU for extended periods.
  • Logs: Application logs showing DecompressionBombError or DecompressionBombWarning exceptions raised after Ghostscript completes (i.e., after resource consumption has already occurred).
  • Disk: Rapid growth of temporary directory disk usage correlated with EPS file upload events.
  • Network: High volume of small EPS file uploads (< 200 bytes) to image-processing endpoints from a single source IP (Pillow Advisory).

Mitigation and workarounds

The primary remediation is to upgrade Pillow to version 13.0.0 or later, which adds a call to Image._decompression_bomb_check((width, height)) in Ghostscript() immediately after computing scaled dimensions and before invoking Ghostscript (Fix Commit, Pillow 13.0.0 Release). If upgrading immediately is not possible, consider the following workarounds: (1) disable EPS rendering entirely if not required; (2) validate and reject EPS/PS files before processing; (3) restrict or avoid using load(scale=N) with N > 1 on untrusted input; (4) apply OS-level resource limits (e.g., ulimit, cgroups) on CPU time and disk space for Ghostscript processes. IBM Netezza Software users should also refer to the IBM advisory for product-specific guidance (IBM Advisory).

Community reactions

The vulnerability was reported and patched by Pillow maintainer radarhere, who noted it as the EPS counterpart of a previously fixed WMF load(dpi) gap and described it as adding a constant factor to an existing denial-of-service surface rather than introducing a new capability (Fix PR). Downstream distributions including SUSE, openSUSE, Red Hat, and FreeBSD issued security advisories and updated packages. IBM also published a bulletin for affected Netezza Software products (IBM Advisory). Community coverage was moderate, with security aggregators such as Tenable, Qualys, and AusCERT tracking the issue; no significant social media controversy or high-profile researcher commentary was observed.

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

pillow

Affected

sid

pillow: 13.0.0-1

Fixed

trixie

pillow

Affected

Ubuntu

Unknown

bionic (esm-infra)

pillow

Unknown

devel

pillow

Unknown

focal (esm-apps)

pillow-python2

Unknown

focal (esm-infra)

pillow

Unknown

jammy

pillow

Unknown

noble

pillow

Unknown

resolute

pillow

Unknown

trusty (esm-infra-legacy)

pillow

Unknown

RHEL / CentOS

Affected

RHEL 8

python-pillow.src

Affected

Source: This report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-hhqh-8jpj-27rfCRITICAL9.8
  • Python logoPython
  • lmcache
NoYesNov 23, 2026
CVE-2026-130164HIGH7.8
  • Python logoPython
  • hermes-agent
NoYesNov 23, 2026
GHSA-v8x2-8vhg-5vc3MEDIUM5.8
  • Python logoPython
  • nautobot
NoYesNov 23, 2026
GHSA-gfqr-fp2c-h495MEDIUM5.4
  • Python logoPython
  • nautobot
NoYesNov 23, 2026
GHSA-jg4p-wprm-8hphMEDIUM5.3
  • Python logoPython
  • lmcache
NoYesNov 23, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management