Skip to content
Heist/ feed
Back to feed
MediumFix available

Pillow: Quadratic GIF comment copying during save

Type: advisorySources: OSV

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.

Products
pillow
Affected versions
10.0.0, 10.0.1, 10.1.0, 10.2.0, 10.3.0, 10.4.0, 11.0.0, 11.1.0, 11.2.1, 11.3.0, 12.0.0, 12.1.0, 12.1.1, 12.2.0, 12.3.0, 9.2.0, 9.3.0, 9.4.0, 9.5.0
Fixed versions
13.0.0
CVEs
CVE-2026-112891
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 10:37 UTC · Revision 1

Source evidence

Pillow: Quadratic GIF comment copying during save

core-osv · Original source

Published 21 Oct 2026, 20:38 UTC

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.

osv:GHSA-fc9g-5qg7-mf45

pillow

Fixed versions: 13.0.0

Complete source record
{
  "id": "4dde1252968d4f105b8301410a8d59c0f4d76f661a9a90bb0c0c1b1ba061a466",
  "url": "https://osv.dev/vulnerability/GHSA-fc9g-5qg7-mf45",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Pillow: Quadratic GIF comment copying during save",
    "summary": "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.",
    "evidence": "osv:GHSA-fc9g-5qg7-mf45",
    "products": [
      {
        "name": {
          "value": "pillow",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "13.0.0",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "10.0.0",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "10.0.1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "10.1.0",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "10.2.0",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "10.3.0",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "10.4.0",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "11.0.0",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "11.1.0",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "11.2.1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "11.3.0",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "12.0.0",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "12.1.0",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "12.1.1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "12.2.0",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "12.3.0",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "9.2.0",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "9.3.0",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "9.4.0",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "9.5.0",
            "evidence": "/affected/0/versions"
          }
        ]
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "GHSA-fc9g-5qg7-mf45",
      "aliases": [
        "BIT-pillow-2026-112891",
        "CVE-2026-112891",
        "GHSA-fc9g-5qg7-mf45"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "9.2.0"
                },
                {
                  "fixed": "13.0.0"
                }
              ]
            }
          ],
          "package": {
            "name": "pillow",
            "purl": "pkg:pypi/pillow",
            "ecosystem": "PyPI"
          },
          "versions": [
            "10.0.0",
            "10.0.1",
            "10.1.0",
            "10.2.0",
            "10.3.0",
            "10.4.0",
            "11.0.0",
            "11.1.0",
            "11.2.1",
            "11.3.0",
            "12.0.0",
            "12.1.0",
            "12.1.1",
            "12.2.0",
            "12.3.0",
            "9.2.0",
            "9.3.0",
            "9.4.0",
            "9.5.0"
          ],
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-fc9g-5qg7-mf45/GHSA-fc9g-5qg7-mf45.json"
          }
        }
      ],
      "modified": "2026-10-26T08:56:06.483214483Z",
      "provider": "osv",
      "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"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-407"
        ],
        "severity": "MODERATE",
        "github_reviewed": true,
        "nvd_published_at": "2026-10-19T22:17:08Z",
        "github_reviewed_at": "2026-10-21T20:38:43Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-112891",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 446810,
  "published_at": "2026-10-21T20:38:43+00:00"
}