Uncontrolled Memory Allocation in Pillow - CVE-2026-55380

 

Uncontrolled Memory Allocation in Pillow - CVE-2026-55380

Published: July 3, 2026


Vulnerability identifier: #VU136857
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2026-55380
CWE-ID: CWE-789
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: Alex Clark and Contributors
Affected software:
Pillow

Detailed vulnerability description

The vulnerability allows a remote attacker to cause a denial of service.

The vulnerability exists due to memory allocation with excessive size value in GdImageFile._open() and the subsequent image loading path when processing a crafted .gd image through PIL.GdImageFile.open(fp) and calling load(). A remote attacker can supply a specially crafted .gd file with oversized dimensions to cause a denial of service.

A 1037-byte header-only file is sufficient to trigger an attempted allocation of approximately 4.3 GB.


How to mitigate CVE-2026-55380

Install security update from vendor's website.

Sources