CVE-2026-55380

Pillow GdImageFile decompression bomb protection bypass

Published Jul 6, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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()`
Ubuntu USN Ubuntu USN USN-8999-1 Pillow vulnerabilities
History
Type Values Removed Values Added
First Time appeared Python-pillow
Python-pillow pillow
Vendors & Products Python-pillow
Python-pillow pillow
Type Values Removed Values Added
Metrics ssvc

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

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'}

Weaknesses
  • CWE-1285

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

  • CWE-789

    Memory Allocation with Excessive Size Value

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 6, 2026, 7:23 PM
Reserved
Jun 16, 2026, 6:57 PM
Status
Analyzed
Published
Jul 6, 2026, 7:17 PM
Modified
Oct 25, 2026, 8:10 PM
Severity
Important
Public date
Jul 6, 2026, 6:50 PM