Description
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.
Published: 2026-10-19
Score: 6.9 Medium
EPSS: n/a
KEV: No
Impact: Denial of Service
Action: Patch
AI Analysis

Impact

Pillow, the Python imaging library, copies parts of an image's GIF comment data repeatedly while assembling the global header during a save operation. With versions 9.2.0 through 12.x, an attacker can include a very large comment in an input GIF; the library then performs quadratic copying, expending excessive CPU cycles and potentially delaying or denying service to the application. This weakness is classified as CWE-407, unnecessary computation that can be exploited for denial of service.

Affected Systems

Python‑Pillow’s Pillow library, versions 9.2.0 up to (but not including) 13.0.0, are affected. Version 13.0.0 contains the fix.

Risk and Exploitability

The CVSS score of 6.9 indicates moderate severity, and with no EPSS data the probability of exploitation is unknown. The issue is not listed in the CISA KEV catalog. An application that accepts user‑supplied images and saves them as GIFs can be targeted by an attacker who uploads an image with an oversized GIF comment; during the save operation Pillow will consume large amounts of CPU, which can slow or halt the service. Vulnerable code resides in _get_global_header(), meaning that any client facing image processing workflow that calls Pillow's save function is at risk, assuming the attacker can supply the image.

Generated by OpenCVE AI on October 20, 2026 at 00:39 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Pillow to version 13.0.0 or newer.
  • If an upgrade is not immediately possible, validate or limit the size of GIF comment fields before saving images to prevent oversized comments.
  • Implement CPU usage throttling or rate limiting for image processing endpoints to mitigate potential denial of service attacks.

Generated by OpenCVE AI on October 20, 2026 at 00:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 19 Oct 2026 22:45:00 +0000

Type Values Removed Values Added
First Time appeared Python-pillow
Python-pillow pillow
Vendors & Products Python-pillow
Python-pillow pillow

Mon, 19 Oct 2026 21:45:00 +0000

Type Values Removed Values Added
Description 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.
Title Pillow: Quadratic GIF comment copying during save
Weaknesses CWE-407
References
Metrics cvssV4_0

{'score': 6.9, 'vector': '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'}


Subscriptions

Python-pillow Pillow
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-19T21:33:32.180Z

Reserved: 2026-10-19T20:16:09.856Z

Link: CVE-2026-112891

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-19T22:17:08.640

Modified: 2026-10-19T22:17:08.640

Link: CVE-2026-112891

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-20T00:45:06Z

Weaknesses
  • CWE-407

    Inefficient Algorithmic Complexity