Skip to main content

Python Pillow CVE-2026-54060

| EUVDEUVD-2026-41900 HIGH
Memory Allocation with Excessive Size Value (CWE-789)
2026-07-06 GitHub_M GHSA-5x94-69rx-g8h2 PYSEC-2026-2254
7.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify service that compiles fonts via Pillow
  2. Delivery
    Submit crafted bitmap font
  3. Exploit
    Oversized glyph dimensions bypass bomb check
  4. Execution
    Image.new allocates excessive memory
  5. Impact
    Worker/host memory exhausted (DoS)

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory allocation limits
Exploitation Conditions

Exploitation requires the target application to accept an attacker-controlled bitmap font file and pass it through Pillow's FontFile.compile() (the font-to-bitmap compilation path, e.g. building/saving a PIL font), on any Pillow version below 12.3.0. The limiting factor is that ordinary image decoding is not affected - only the font-compilation code path is, so an app that never compiles untrusted fonts is not exposed. Per the CVSS vector (PR:N/UI:N) no authentication or user interaction is needed once such a font-processing endpoint exists; impact is availability-only (A:H, C:N/I:N), meaning the outcome is resource-exhaustion denial of service, not code execution or data theft.

Impact

The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, 7.5) describes a network-reachable, low-complexity, unauthenticated availability-only impact - consistent with a memory-exhaustion DoS rather than compromise of confidentiality or integrity. No EPSS score, KEV entry, POC, or SSVC decision data was provided, so real-world exploitation probability cannot be quantified from the input; the absence of KEV and POC signals suggests this is not currently a widespread active threat. The 'network' attack vector is nominal: exploitation requires the target application to accept and compile an attacker-supplied bitmap font, which is a comparatively uncommon input path versus ordinary image uploads - verify whether your deployment actually processes untrusted font files before prioritizing. Realistic risk is moderate: high-severity numerically, but scope is limited to services that feed untrusted fonts into FontFile.compile().

Exploit ScenarioDerived

An attacker uploads a specially crafted bitmap font to a web service that uses Pillow to render or convert fonts; when the service calls FontFile.compile(), the oversized combined-bitmap dimensions trigger a huge Image.new allocation that exhausts memory and crashes the worker or host. Because the CVSS vector is AV:N/AC:L/PR:N/UI:N, no authentication or user interaction is required beyond the target accepting the font input. No public POC is identified at time of analysis.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 06, 2026

Uncontrolled memory allocation in Python Pillow before 12.3.0 allows a maliciously crafted font file to trigger excessive memory consumption and denial of service when its glyphs are compiled into a combined bitmap. FontFile.compile() builds the output image via Image.new("1", (xsize, ysize)) without invoking Pillow's decompression-bomb guard, so oversized glyph dimensions are allocated unchecked during conversion or saving. There is no public exploit identified at time of analysis, and it is not listed in CISA KEV; the availability-only impact (CVSS 7.5) reflects resource exhaustion rather than code execution or data disclosure.

RemediationAI

Vendor-released patch: upgrade to Pillow 12.3.0 or later (pip install --upgrade 'Pillow>=12.3.0'), which adds the missing Image._decompression_bomb_check() call in FontFile.compile(); see advisory GHSA-5x94-69rx-g8h2 and release notes for 12.3.0. Where immediate upgrade is not possible, do not pass untrusted or user-supplied bitmap font files into FontFile/ImageFont compilation paths, and validate/limit font glyph dimensions before processing. As a compensating control you can lower PIL.Image.MAX_IMAGE_PIXELS and ensure your code does not suppress the resulting DecompressionBombError, and apply per-process memory limits (e.g., cgroup/ulimit) so an oversized allocation is bounded and the worker is killed rather than exhausting host memory - the trade-off is that legitimate very-large fonts may be rejected and worker restarts add latency. Refer to https://github.com/python-pillow/Pillow/commit/0a263e6264aa5399988d9acd3bbfbca2ca3ec77d for the exact change.

Affected VersionsENISA

Pillow < 12.3.0

Affected Packages

pypi pillow fix: 12.3.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Pillow (PIL fork) is the de-facto Python imaging library, used across web backends, document/thumbnail pipelines, and any service that renders or converts fonts and images. The flaw lives in PIL/FontFile.py, in the FontFile.compile() routine that assembles per-glyph bitmaps into one combined image using Image.new("1", (xsize, ysize)). Pillow normally routes large allocations through Image._decompression_bomb_check() to reject images whose pixel count exceeds MAX_IMAGE_PIXELS, but this code path skipped that guard. This maps to CWE-789 (Memory Allocation with Excessive Size Value): attacker-influenced xsize/ysize values derived from font metrics drive an unbounded allocation. The affected component is the bitmap font handling (e.g., BDF/PCF-style font compilation), not general JPEG/PNG decoding.

Know when Pillow gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 7.5 HIGH

Network-reachable unauthenticated font input (AV:N/PR:N/UI:N) causes memory-exhaustion DoS only, so A:H with C:N/I:N; AC:L as a single crafted font suffices.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE HIGH
Red Hat 7.5 HIGH

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

1
Patch available
Jul 06, 2026 - 20:02 EUVD

DescriptionCVE.org

Pillow is a Python imaging library. Prior to 12.3.0, PIL/FontFile.py FontFile.compile() assembled per-glyph images into a combined bitmap with Image.new("1", (xsize, ysize)) without calling Image._decompression_bomb_check(), allowing a font to trigger excessive allocation during conversion or saving. This issue is fixed in version 12.3.0.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 2,738 pypi packages depend on pillow (1,113 direct, 1,653 indirect)

Ecosystem-wide dependent count for version 12.3.0.

Executive ViewAI

Why It Matters

Python Pillow versions before 12.3.0 contain a memory exhaustion vulnerability exploitable through malicious font files, creating denial-of-service risk for applications processing untrusted fonts. Organizations using Pillow for image or font processing-including web services, document handlers, and content platforms-could experience service unavailability if an attacker submits specially crafted font files.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Implement: font file input validation (restrict to trusted sources only), strict memory and CPU resource quotas for image processing operations, containerized or sandboxed font compilation environments, maximum file size enforcement on font inputs, and disable FontFile.compile() functionality where not required for business operations.

Threat Intelligence Overview

EPSS Score
0.3%
Top 74% exploitable
Prevalence
Ubiquitous
Pillow is the standard Python imaging library, embedded in countless services
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

58
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Pillow

View all
CVE-2022-30595 CRITICAL POC
9.8 May 25

libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files. Rated

CVE-2026-59204 HIGH POC
8.7 Jul 14

Denial of service in Python Pillow (versions 8.2.0 through 12.2.0) allows remote attackers to exhaust memory during JPEG

CVE-2026-54058 HIGH POC
8.3 Jul 14

Out-of-bounds memory disclosure in Python Pillow before 12.3.0 lets an attacker who supplies a crafted McIdas AREA image

CVE-2026-59197 HIGH POC
8.2 Jul 14

Heap out-of-bounds write in Python Pillow prior to 12.3.0 lets an attacker who controls the rank-filter size parameter c

CVE-2026-59205 HIGH POC
7.5 Jul 14

Denial-of-service and controlled heap corruption in Python's Pillow imaging library (all versions prior to 12.3.0) occur

CVE-2026-59203 HIGH POC
7.5 Jul 14

Denial of service in Python Pillow 12.0.0 through 12.2.0 lets a remote attacker hang an application by supplying a craft

CVE-2026-59199 HIGH POC
7.5 Jul 14

Denial of service (and potential memory corruption) in Python Pillow before 12.3.0 arises when public image coordinate A

CVE-2026-55379 HIGH POC
7.5 Jul 06

Uncontrolled memory allocation in Python Pillow before 12.3.0 lets a crafted BDF font file exhaust available memory and

CVE-2026-59200 HIGH POC
7.5 Jul 14

Uncontrolled memory consumption in Python Pillow (PIL) versions 5.1.0 through 12.2.x allows a remote attacker to cause d

CVE-2026-55380 HIGH POC
7.5 Jul 06

Denial-of-service via memory exhaustion in Python Pillow before 12.3.0 allows a crafted GD-format (.gd) image to trigger

CVE-2026-54059 HIGH POC
7.5 Jul 06

Uncontrolled memory allocation in the Python Pillow imaging library (all versions prior to 12.3.0) allows a crafted PCF

CVE-2026-59198 HIGH POC
7.5 Jul 14

Out-of-bounds heap read in Python Pillow's TGA RLE encoder (versions 5.2.0 through 12.2.x) lets adjacent process heap by

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Liberty Linux 8 Fixed
SUSE Linux Enterprise Module for Package Hub 15 SP7 Fixed
SUSE Linux Enterprise Server 16.0 SUSE Linux Enterprise Server for SAP applications 16.0 Fixed
openSUSE Leap 16.0 Fixed
openSUSE Tumbleweed Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy