Description
Pillow is a Python imaging library. Prior to 12.3.0, PIL/GdImageFile.py GdImageFile._open() read image dimensions from the GD 2.x header and stored them in self._size without calling Image._decompression_bomb_check(), allowing a crafted .gd file to trigger excessive C-heap allocation when loaded. This issue is fixed in version 12.3.0.
Published: 2026-07-06
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Pillow is a Python imaging library that, before version 12.3.0, had a flaw in GdImageFile._open. The routine read image dimensions from the GD 2.x header and stored them in the instance attribute _size without invoking Image._decompression_bomb_check(). A crafted .gd file that declares an inflated size can therefore trigger excessive C‑heap allocation when the file is opened. This can exhaust system memory or crash the Pillow‑enabled process, resulting in a denial‑of‑service condition. The weakness corresponds to logic or state management (CWE‑1285) and out‑of‑bounds memory allocation (CWE‑789).

Affected Systems

The Pillow library (Python Imaging Library) is used by Python applications that process image files. All installations of Pillow earlier than version 12.3.0 that use the GdImageFile class to open GD (Graphics Draw) image files are vulnerable. The issue is platform‑agnostic because Pillow runs on any system that supports Python.

Risk and Exploitability

The CVSS score of 7.5 indicates a high severity vulnerability, yet the EPSS score of less than 1% shows a low yet non‑zero exploitation probability. It is not listed in the CISA KEV catalog. An attacker can deliver a malicious .gd image to a Pillow‑enabled application either over the network if the application accepts user uploads or locally if the user can supply file paths. The resulting excessive memory allocation may cause the process to crash or the system to become unresponsive; the impact is denial of service only, with no privilege escalation or data exfiltration.

Generated by OpenCVE AI on July 23, 2026 at 14:40 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Pillow to version 12.3.0 or newer
  • If an upgrade cannot be performed immediately, disable GD image support by removing or commenting out the import of GdImageFile or by preventing Pillow from loading .gd files
  • Prior to opening image data, validate the declared image size against a defined threshold, and reject or partially process files that exceed acceptable limits

Generated by OpenCVE AI on July 23, 2026 at 14:40 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-phj9-mv4w-65pm Pillow `GdImageFile._open()`: image dimensions accepted without `_decompression_bomb_check()`
History

Tue, 07 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-1285
References
Metrics threat_severity

None

threat_severity

Important


Mon, 06 Jul 2026 20:45:00 +0000

Type Values Removed Values Added
First Time appeared Python-pillow
Python-pillow pillow
Vendors & Products Python-pillow
Python-pillow pillow

Mon, 06 Jul 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 06 Jul 2026 19:15:00 +0000

Type Values Removed Values Added
Description Pillow is a Python imaging library. Prior to 12.3.0, PIL/GdImageFile.py GdImageFile._open() read image dimensions from the GD 2.x header and stored them in self._size without calling Image._decompression_bomb_check(), allowing a crafted .gd file to trigger excessive C-heap allocation when loaded. This issue is fixed in version 12.3.0.
Title Pillow GdImageFile decompression bomb protection bypass
Weaknesses CWE-789
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}


Subscriptions

Python-pillow Pillow
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-06T19:23:30.046Z

Reserved: 2026-06-16T18:57:40.182Z

Link: CVE-2026-55380

cve-icon Vulnrichment

Updated: 2026-07-06T19:23:25.915Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Important

Publid Date: 2026-07-06T18:50:14Z

Links: CVE-2026-55380 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-23T14:45:03Z

Weaknesses
  • CWE-1285

    Improper Validation of Specified Index, Position, or Offset in Input

  • CWE-789

    Memory Allocation with Excessive Size Value