Uncontrolled Memory Allocation in Pillow - CVE-2026-54059

 

Uncontrolled Memory Allocation in Pillow - CVE-2026-54059

Published: July 3, 2026


Vulnerability identifier: #VU136859
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-54059
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 PcfFontFile._load_bitmaps() when parsing a crafted PCF font file. A remote attacker can supply a crafted PCF font with oversized glyph dimensions to cause a denial of service.

The issue occurs because glyph dimensions from the PCF METRICS section are passed to Image.frombytes() without a decompression bomb check before memory allocation.


How to mitigate CVE-2026-54059

Install security update from vendor's website.

Sources