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 widely used Python imaging library. Before version 12.3.0, the GdImageFile._open method read image dimensions from the GD 2.x header and stored them in the internal _size attribute without calling Image._decompression_bomb_check(). This oversight allows a crafted .gd file to declare an exaggerated size, causing Pillow to allocate excessive C‑heap memory when the file is opened. The resulting memory exhaustion can crash the Pillow‑enabled process or exhaust system memory, leading to a denial‑of‑service condition. The weakness aligns with logic or state management failure (CWE‑1285) and out‑of‑bounds memory allocation (CWE‑789).

Affected Systems

All installations of the Pillow library prior to version 12.3.0 that employ the GdImageFile class to load GD (Graphics Draw) image files are affected. Because Pillow runs on any platform that supports Python, the vulnerability is platform‑agnostic and can impact any application that processes .gd images using Pillow.

Risk and Exploitability

The CVSS score of 7.5 indicates a high severity vulnerability, while an EPSS score of less than 1% reflects a very low but non‑zero likelihood of exploitation. The issue is not currently listed in the CISA KEV catalog. Based on the description, it is inferred that an attacker must provide a malicious .gd file to a Pillow‑enabled application; if the application accepts user uploads, network delivery is possible, or otherwise the file may be supplied locally. The ensuing excessive memory allocation may crash the process or render the application unresponsive, delivering a denial‑of‑service impact with no privilege escalation or data exfiltration.

Generated by OpenCVE AI on August 1, 2026 at 18:24 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Pillow to version 12.3.0 or newer
  • If an upgrade is not immediately possible, disable GD image support by removing or commenting out the GdImageFile import or preventing Pillow from processing .gd files
  • Before opening image data, validate the declared image size against an acceptable threshold and reject or partially process files that exceed this limit

Generated by OpenCVE AI on August 1, 2026 at 18:24 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
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

Status : Analyzed

Published: 2026-07-06T19:17:08.703

Modified: 2026-07-07T18:58:54.647

Link: CVE-2026-55380

cve-icon Redhat

Severity : Important

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

Links: CVE-2026-55380 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-01T18:30:05Z

Weaknesses
  • CWE-1285

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

  • CWE-789

    Memory Allocation with Excessive Size Value