---
schema_version: '1.0'
id: security-20261022-9736e9
title: 'CVE-2026-112891: Pillow: Quadratic GIF comment copying during save'
url: https://osv.dev/vulnerability/GHSA-fc9g-5qg7-mf45
url_hash: 9736e962c115f2257a70a8752fa542ea0ce5ff751b79796570a9ea7b2b614fb6
canonical_url: https://osv.dev/vulnerability/GHSA-fc9g-5qg7-mf45
source: osv:ghsa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-112891
- GHSA-fc9g-5qg7-mf45
- severity: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
- pillow
- PyPI
lang: en
published_at: '2026-10-21T20:38:43Z'
fetched_at: '2026-10-22T11:50:12.871760Z'
updated_at: '2026-10-22T17:08:16Z'
status: published
content_hash: 95d1d92c4fa8bd75b7027ddd60c753072eed68a7ef086e336837f94807e8437b
content_changed_at: null
license_note: full
summary: 'Pillow: Quadratic GIF comment copying during save'
summary_source: rss
summary_en: 'Pillow: Quadratic GIF comment copying during save'
summary_omitted_reason: null
redistribution: true
keywords_en:
- comment
- copying
- cve
- CVE-2026-112891
- during
- GHSA-fc9g-5qg7-mf45
- GIF
- GIFFORDS
- library vulnerability
- pillow
- PyPI
- Quadratic
- save
- severity: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
- Shay McVeigh
- software security
entities_en:
- name: GIFFORDS
  type: organization
- name: Shay McVeigh
  type: person
topics_en:
- library vulnerability
- software security
numeric_facts: []
entities:
- name: Shay McVeigh
  type: person
- name: GIFFORDS
  type: organization
key_facts: []
related: []
related_auto:
- name: Bristol Crown Court
  type: organization
  weight: 1.0
- name: Bristol Magistrates Court
  type: organization
  weight: 1.0
computed_at: '2026-10-22T17:08:13Z'
---

# CVE-2026-112891: Pillow: Quadratic GIF comment copying during save

## TL;DR
Pillow: Quadratic GIF comment copying during save

## Key Points
- cve / CVE-2026-112891 / GHSA-fc9g-5qg7-mf45 / severity: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 / pillow / PyPI

## Details
**Severity:** 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
**Advisory:** GHSA-fc9g-5qg7-mf45 (CVE-2026-112891)

**Details:**
On Pillow 12.3.0 and upstream `main` (`ad277e2761b489681e71b51e91367d46b0ceabb9`), a GIF with a long comment makes `_get_global_header()` copy portions of the comment repeatedly when saving, including comments carried over from untrusted images. I suggest provisional **Moderate** severity for crafted-image CPU denial of service, with CVSS-B 6.9 assuming a network service automatically opens unauthenticated uploads and they are resaved as GIFs; impact depends on input-size, concurrency, and worker CPU limits.

**References:**
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-fc9g-5qg7-mf45
- https://nvd.nist.gov/vuln/detail/CVE-2026-112891
- https://github.com/python-pillow/Pillow/commit/68a3fe957d8a4d552e8c69d96066d749f0614c7e
- https://github.com/python-pillow/Pillow
- https://github.com/python-pillow/Pillow/releases/tag/13.0.0

_Data: OSV.dev (upstream: ghsa) — https://osv.dev/vulnerability/GHSA-fc9g-5qg7-mf45_

## Source
元記事: [CVE-2026-112891: Pillow: Quadratic GIF comment copying during save](https://osv.dev/vulnerability/GHSA-fc9g-5qg7-mf45) — published 2026-10-21T20:38:43Z
