Description
Pillow is a Python imaging library. Prior to 12.3.0, PIL/PcfFontFile.py _load_bitmaps() read glyph dimensions from the PCF METRICS section and passed them directly to Image.frombytes() without calling Image._decompression_bomb_check(), allowing crafted PCF font data to cause excessive memory allocation. 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

The vulnerability is in Pillow’s PcfFontFile._load_bitmaps() routine, which reads glyph dimensions from a PCF font’s METRICS section and supplies them directly to Image.frombytes() without invoking the internal decompress‑F font to force Pillow to allocate an unusually large amount of memory, potentially exhausting system resources, causing the process to hang or crash, and resulting in denial of service. The weakness aligns with CWE‑789 (Uncontrolled Memory Allocation) and CWE‑409 (Security Feature Failure).

Affected Systems

All Pillow releases older than 12.3.0 font files, such as image processing pipelines, web applications, PDF renderers, or any code that accepts external font inputs.

Risk and Exploitability

With a CVSS score of 7.5, the issue is categorized as high severity. The EPSS score of <1% indicates a very low probability of exploitation, and the vulnerability is not listed in the CISA KEV catalog, suggesting attack vector is an application that accepts a PCF font file from an external source; the attacker must supply the crafted file to trigger the excessive memory allocation. Because the flaw requires direct control over the input font file and no publicly available payloads are known, the risk remains moderate despite the high severity metric.

Generated by OpenCVE AI on July 26, 2026 at 20:22 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update12.3.0 or later to apply the bug fix.
  • Implement validation logic that checks PCF glyph dimensions or limits total memory usage before creating image objects.
  • Run Pillow‑based image processing in a sandboxed or resource‑limited environment to prevent a single instance from exhausting host memory.

Generated by OpenCVE AI on July 26, 2026 at 20:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-8v84-f9pq-wr9x Pillow `PcfFontFile._load_bitmaps()`: `Image.frombytes()` called without `_decompression_bomb_check()` — bomb protection bypass via PCF font loading
History

Wed, 08 Jul 2026 00:15:00 +0000

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

None

threat_severity

Important


Tue, 07 Jul 2026 17: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 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 19:15:00 +0000

Type Values Removed Values Added
Description Pillow is a Python imaging library. Prior to 12.3.0, PIL/PcfFontFile.py _load_bitmaps() read glyph dimensions from the PCF METRICS section and passed them directly to Image.frombytes() without calling Image._decompression_bomb_check(), allowing crafted PCF font data to cause excessive memory allocation. This issue is fixed in version 12.3.0.
Title Pillow: PcfFontFile._load_bitmaps()`: `Image.frombytes()` called without `_decompression_bomb_check()` — bomb protection bypass via PCF font loading
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-07T16:57:53.021Z

Reserved: 2026-06-11T18:24:35.096Z

Link: CVE-2026-54059

cve-icon Vulnrichment

Updated: 2026-07-07T16:44:30.369Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Important

Publid Date: 2026-07-06T18:46:09Z

Links: CVE-2026-54059 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-26T20:30:03Z

Weaknesses
  • CWE-409

    Improper Handling of Highly Compressed Data (Data Amplification)

  • CWE-789

    Memory Allocation with Excessive Size Value