Skip to content
Heist/ feed
Back to feed
Medium

Pillow: Image.quantize() with empty palette leaks uninitialized stack memory

Type: advisorySources: Official CVE List

Pillow is a Python imaging library. From 9.1.0 until 13.0.0, Pillow can disclose uninitialized stack memory when Image.quantize() uses an empty palette. ImagingPaletteCacheUpdate() leaves a local cache array uninitialized when the palette has zero entries, and the conversion path emits those bytes as output pixel indices. An attacker who controls the palette image can obtain stack contents from a returned PNG or GIF. This can disclose addresses and stack-canary data without an out-of-bounds access, memory corruption, or process crash. This issue is fixed in version 13.0.0.

Products
Pillow
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-112898
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 14:53 UTC · Revision 2

Source evidence

Pillow: Image.quantize() with empty palette leaks uninitialized stack memory

core-cve · Original source

Published 19 Oct 2026, 22:04 UTC

Pillow is a Python imaging library. From 9.1.0 until 13.0.0, Pillow can disclose uninitialized stack memory when Image.quantize() uses an empty palette. ImagingPaletteCacheUpdate() leaves a local cache array uninitialized when the palette has zero entries, and the conversion path emits those bytes as output pixel indices. An attacker who controls the palette image can obtain stack contents from a returned PNG or GIF. This can disclose addresses and stack-canary data without an out-of-bounds access, memory corruption, or process crash. This issue is fixed in version 13.0.0.

cve:CVE-2026-112898

Pillow

Fixed versions: Not specified

Complete source record
{
  "id": "9efb3337a7bf0c5b8c2add6991a575cfd3502c3a93d73b6d8a655cb144a38f47",
  "url": "https://www.cve.org/CVERecord?id=CVE-2026-112898",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Pillow: Image.quantize() with empty palette leaks uninitialized stack memory",
    "summary": "Pillow is a Python imaging library. From 9.1.0 until 13.0.0, Pillow can disclose uninitialized stack memory when Image.quantize() uses an empty palette. ImagingPaletteCacheUpdate() leaves a local cache array uninitialized when the palette has zero entries, and the conversion path emits those bytes as output pixel indices. An attacker who controls the palette image can obtain stack contents from a returned PNG or GIF. This can disclose addresses and stack-canary data without an out-of-bounds access, memory corruption, or process crash. This issue is fixed in version 13.0.0.",
    "evidence": "cve:CVE-2026-112898",
    "products": [
      {
        "name": {
          "value": "Pillow",
          "evidence": "/containers/cna/affected/0/product"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-112898",
      "aliases": [
        "CVE-2026-112898"
      ],
      "metrics": [
        {
          "cvssV4_0": {
            "version": "4.0",
            "baseScore": 6.9,
            "attackVector": "NETWORK",
            "baseSeverity": "MEDIUM",
            "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N",
            "userInteraction": "NONE",
            "attackComplexity": "LOW",
            "attackRequirements": "NONE",
            "privilegesRequired": "NONE",
            "subIntegrityImpact": "NONE",
            "vulnIntegrityImpact": "NONE",
            "subAvailabilityImpact": "NONE",
            "vulnAvailabilityImpact": "NONE",
            "subConfidentialityImpact": "NONE",
            "vulnConfidentialityImpact": "LOW"
          }
        }
      ],
      "affected": [
        {
          "vendor": "python-pillow",
          "product": "Pillow",
          "versions": [
            {
              "status": "affected",
              "version": ">= 9.1.0, < 13.0.0"
            }
          ]
        }
      ],
      "modified": "2026-10-28T15:15:44.187Z",
      "provider": "cve",
      "references": [
        "https://github.com/python-pillow/Pillow/security/advisories/GHSA-rfgq-q3w2-pmv2",
        "https://github.com/python-pillow/Pillow/commit/13943c8f857b22f073d30f0ef9b725a0d255f1a4",
        "https://github.com/python-pillow/Pillow/releases/tag/13.0.0"
      ],
      "provider_metadata": {
        "adp": [
          {
            "title": "CISA ADP Vulnrichment",
            "metrics": [
              {
                "other": {
                  "type": "ssvc",
                  "content": {
                    "id": "CVE-2026-112898",
                    "role": "CISA Coordinator",
                    "options": [
                      {
                        "Exploitation": "poc"
                      },
                      {
                        "Automatable": "yes"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "version": "2.0.3",
                    "timestamp": "2026-10-28T15:15:33.855924Z"
                  }
                }
              }
            ],
            "references": [
              {
                "url": "https://github.com/python-pillow/Pillow/security/advisories/GHSA-rfgq-q3w2-pmv2",
                "tags": [
                  "exploit"
                ]
              }
            ],
            "providerMetadata": {
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP",
              "dateUpdated": "2026-10-28T15:15:44.187Z"
            }
          }
        ],
        "cna": {
          "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
          "shortName": "GitHub_M",
          "dateUpdated": "2026-10-19T22:04:23.462Z"
        }
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-112898",
        "evidence": "/cveMetadata/cveId"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/containers/cna/metrics"
  },
  "source_id": "core-cve",
  "document_id": 454320,
  "published_at": "2026-10-19T22:04:23.462+00:00"
}