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.
Fix
Patch, vendor advisory and mitigation references on NVD 3
- https://github.com/python-pillow/Pillow/commit/13943c8f857b22f073d30f0ef9b725a0d255f1a4 Patch
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-rfgq-q3w2-pmv2 Exploit, Mitigation, Vendor Advisory
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-rfgq-q3w2-pmv2 Exploit, Mitigation, Vendor Advisory
Every line above is quoted from NVD, CISA, Microsoft, the vendor's own advisory or DISA; nothing is generated.
Change history 6
- StatusAnalyzed → ModifiedNVD modified 2026-10-28 16:17
- Cpes+1 CPE criteria (now 1)NVD modified 2026-10-27 14:55
- StatusUndergoing Analysis → AnalyzedNVD modified 2026-10-27 14:55
- StatusPublished → Undergoing AnalysisNVD modified 2026-10-20 19:48
- StatusReceived → PublishedNVD modified 2026-10-19 22:04
- First seenCVSS 6.9NVD modified 2026-10-19 22:17
Affected (CPE criteria) 1
cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*
References 4
- https://github.com/python-pillow/Pillow/commit/13943c8f857b22f073d30f0ef9b725a0d255f1a4 Patch
- https://github.com/python-pillow/Pillow/releases/tag/13.0.0 Release Notes
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-rfgq-q3w2-pmv2 Exploit, Mitigation, Vendor Advisory
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-rfgq-q3w2-pmv2 Exploit, Mitigation, Vendor Advisory