Skip to main content

Python Pillow EUVDEUVD-2026-104649

| CVE-2026-112891 MEDIUM
Inefficient Algorithmic Complexity (CWE-407)
2026-10-19 GitHub_M GHSA-fc9g-5qg7-mf45
6.9
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Upload image with oversized GIF comment
  2. Exploit
    App re-saves image as GIF via Pillow
  3. Execution
    Quadratic copying in _get_global_header()
  4. Impact
    CPU exhaustion and denial of service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
Exploitation Conditions

Exploitation requires an application built on Pillow 9.2.0 up to (but not including) 13.0.0 that accepts an attacker-supplied input image and saves/re-encodes it as GIF while retaining the embedded comment from the untrusted source. The specific trigger is a GIF (or convertible image) carrying a very large comment extension block, which drives the quadratic copy loop in _get_global_header(). The practical limiting factor is the save-as-GIF-with-comment workflow: services that never output GIF, or that strip comments before saving, are not affected. No authentication or user interaction is needed per the vector (PR:N/UI:N), but the vulnerable code path must actually be reachable with attacker-controlled comment data.

Impact

This is a genuine but moderate-severity availability issue, not a top-tier emergency. The input CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) with only VA:L and no confidentiality/integrity impact correctly characterizes it as an algorithmic-complexity denial of service (CWE-407): quadratic copying in GIF _get_global_header() when a large comment is present. No EPSS score, KEV listing, or POC was provided, so the exploitation signal is weak - this maps to 'no public exploit identified at time of analysis.' The score of 6.9 is driven purely by easy network reachability, not by impact depth: the worst realistic outcome is CPU exhaustion / slow or denied service for the processing worker, with no code execution or data exposure. Note a tag/impact conflict: the input Tags label this 'Information Disclosure,' which contradicts the CVSS vector (VC:N, VI:N, VA:L) and the description - this is strictly an availability/DoS flaw, so the 'Information Disclosure' tag appears mislabeled and should be disregarded. Priority should be driven by whether an exposed application actually re-saves untrusted images as GIF.

Exploit ScenarioDerived

An attacker uploads an image containing an oversized GIF comment to a web service that uses Pillow to re-encode or save user-supplied images as GIF. During save, _get_global_header() repeatedly copies the retained comment data, producing quadratic CPU cost that stalls the worker and degrades or denies service for other users. No public exploit code was identified, but the trigger is trivial to construct from the public description and commit.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Oct 19, 2026

Saving attacker-controlled images as GIF in Python Pillow 9.2.0 through 12.x can drive quadratic comment-header assembly and consume excessive CPU, delaying or denying service. The issue is reachable without authentication or user interaction (assessed CVSS:3.1 AV:N/AC:L/PR:N/UI:N), but only when an application preserves a very large embedded GIF comment and re-encodes the image as GIF; impact is limited to availability. No public exploit code or CISA KEV entry was identified in the supplied intelligence, and the vendor-released fix is Pillow 13.0.0.

RemediationAI

Upgrade to Pillow 13.0.0, which contains the vendor-released fix; see the advisory at https://github.com/python-pillow/Pillow/security/advisories/GHSA-fc9g-5qg7-mf45, the fix commit at https://github.com/python-pillow/Pillow/commit/68a3fe957d8a4d552e8c69d96066d749f0614c7e, and the release at https://github.com/python-pillow/Pillow/releases/tag/13.0.0. If an immediate upgrade is not possible, remove or refuse embedded comments before GIF save (for example, strip the comment from the image metadata rather than preserving untrusted info["comment"]); this loses benign caption metadata and may break workflows that depend on comments. Applications can also disable GIF re-encoding of untrusted images, enforce strict limits on input file size and GIF comment/subblock length, and run conversion in a sandboxed process with CPU and time quotas; these controls reduce functionality or throughput, and aggressive timeouts may abort legitimate large image jobs.

Affected VersionsENISA

Pillow 9.2.0, < 13.0.0

Affected Packages

pypi pillow fix: 13.0.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

This is an algorithmic-complexity issue (CWE-407) in Pillow's GIF handling. GIF comment extension blocks can carry arbitrary byte data, and Pillow previously assembled the global header by repeatedly concatenating comment subblocks into a growing buffer in _get_global_header(); the repeated copying scales quadratically with comment size. The related _seek() logic also repeatedly appended to the stored info["comment"], so comments retained from an untrusted input image could amplify the work when the image was later saved as GIF. Commit 68a3fe957d8a4d552e8c69d96066d749f0614c7e changes the code to collect comment blocks and header blocks in lists and join or append them without repeated large-buffer copies. The supplied CPE cpe:2.3:a:python-pillow:pillow:*:*:*:*:*:*:*:* identifies the Pillow package, while the advisory-defined vulnerable range is 9.2.0 up to, but not including, 13.0.0. The vulnerable path is not reached merely by opening a GIF; exploitation depends on an application saving or re-encoding attacker-supplied content as GIF while retaining the embedded comment.

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 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
vuln.today AI 5.3 MEDIUM

Network-reachable via image upload with no auth or interaction (AV:N/AC:L/PR:N/UI:N); availability-only CPU-exhaustion DoS with no confidentiality or integrity impact (C:N/I:N/A:L).

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Oct 19, 2026 - 23:18 EUVD
CVE Published
Oct 19, 2026 - 21:33 cve.org
MEDIUM 6.9

DescriptionCVE.org

Pillow is a Python imaging library. From 9.2.0 until 13.0.0, Pillow performs quadratic copying when saving a GIF with a long comment. _get_global_header() repeatedly copies portions of comment data while assembling the global header, including comments retained from an untrusted input image. An attacker can supply an image with a large GIF comment to an application that saves it as GIF. This can consume excessive CPU and delay or deny service. This issue is fixed in version 13.0.0.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 180 pypi packages depend on pillow (154 direct, 27 indirect)

Ecosystem-wide dependent count for version 9.2.0.

Threat Intelligence Overview

EPSS Score
0.4%
Top 70% exploitable
Prevalence
High
Pillow is a near-ubiquitous Python imaging library in web/backend apps
Threat Intel
1
1 sources
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub

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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
High
Technical Impact
Partial

Priority Score

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

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-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-2021-23437 HIGH POC
7.5 Sep 03

The package pillow 5.2.0 and before 8.3.2 are vulnerable to Regular Expression Denial of Service (ReDoS) via the getrgb

CVE-2025-48379 HIGH POC
7.1 Jul 01

Pillow is a Python imaging library. In versions 11.2.0 to before 11.3.0, there is a heap buffer overflow when writing a

CVE-2016-4009 CRITICAL
9.8 Apr 13

Integer overflow in the ImagingResampleHorizontal function in libImaging/Resample.c in Pillow before 3.1.1 allows remote

CVE-2014-3007 CRITICAL
10.0 Apr 27

Python Image Library (PIL) 1.1.7 and earlier and Pillow 2.3 might allow remote attackers to execute arbitrary commands v

CVE-2026-96639 CRITICAL
9.8 Oct 21

Pillow versions 11.0.0 through 12.x (fixed in 13.0.0) can reuse a stale native ImagingCore buffer when a multi-frame ima

CVE-2021-34552 CRITICAL
9.8 Jul 13

Pillow through 8.2.0 and PIL (aka Python Imaging Library) through 1.1.7 allow an attacker to pass controlled parameters

CVE-2021-25289 CRITICAL
9.8 Mar 19

An issue was discovered in Pillow before 8.1.1. Rated critical severity (CVSS 9.8), this vulnerability is remotely explo

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