Vulnerabilities

Security fix · CVE-2026-112898

Pillow is a Python imaging library.

Published Oct 19, 2026 · catalog updated Oct 26, 2026 · Pillow is a Python

Last checked Oct 31, 2026. A connected source was read within the last 7 days.

Check if you run it

No confirmed exploitation is on record for CVE-2026-112898. EPSS is 0.34%. Act only if a listed version of Pillow is a Python is installed.

Gaps on this record

  • The stored product name is a package slug. The name on this page is taken from the title (Pillow is a Python).
  • No vendor fix or required action is stored. Compare the linked advisory before you change production.
Severity
Medium6.9
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
0.34%
Remediation
Version ranges on file
Affected products
PyPI pillow · pip Pillow · pypi pillow

When an application lets a user supply the palette image for Pillow's , the user can get back 512 bytes of the server process's stack memory in the pixels of the returned image. An 80-byte PNG with an empty palette is enough, and the leaked bytes survive saving to PNG or GIF. In the runs examined, those bytes included memory addresses inside the stack, heap, libc, libpython and Pillow's own C module, along with the stack-protector canary. The bug is in in . It fills a local only inside loops bounded by . When the palette has zero entries, the array is never written, but it is still copied into the colour cache. in then emits the cached values as output pixel indices. rejects a palette but not one with . Three inputs produce such a zero-entry image: a PNG with a zero-length chunk opened with , a colour-mapped TGA with colour-map length 0, or a bare . The attacker must control the *palette* image; the source image can be anything, and sources are affected with either dither mode. There is no out-of-bounds access and no memory corruption. The consequence is a bounded stack disclosure that can reveal address layout and the canary of a long-lived worker, with no crash and no log entry. The attached reproducer quantizes a 512-colour strip against the empty-palette PNG and finds 8 of the 64 output words pointing into the process's own mapping, while a one-entry palette control yields all zeros. The behaviour was introduced in commit (first released in 9.1.0). The route exists since 10.1.0. ## Details ( ) computes, for one 8×8×8 box of the colour cache, the nearest palette index for each of the 512 slots into a local and then copies into the cache. is only ever written inside . When the palette has zero entries nothing writes it, the untouched stack bytes are copied into the cache, and ( ) emits them as the output pixels of . The root cause is that only rejects a palette, never one with , while silently assumes . A zero-entry image is what produces for a PNG whose chunk has

Are you affected?

Enter the version you run. The result uses only the ranges stored on this record.

The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.

  • PyPI pillow9.1.0 → 13.0.0
  • pip Pillow>= 9.1.0, < 13.0.0
  • pypi pillowversion unspecified

How to fix CVE-2026-112898

What to do

Three questions, each answered from this record only. Confirm the vendor advisory before you patch.

Should you patch?

No confirmed exploitation is on record for CVE-2026-112898. EPSS is 0.34%. Act only if a listed version of Pillow is a Python is installed.

Which versions are affected?

Compare what you have installed with Pillow >= 9.1.0, < 13.0.0. Compare the installed version with the linked vendor advisory before you change production.

What should an analyst verify?

CWE-457. EPSS 0.34%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.

Technology hubs

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Oct 19, 2026 · NIST NVD

    Detected

    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

  2. Oct 20, 2026 · NIST NVD

    Updated

    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

  3. Oct 21, 2026 · GitHub Advisory Database

    Updated

    When an application lets a user supply the palette image for Pillow's , the user can get back 512 bytes of the server process's stack memory in the pixels of the returned image. An 80-byte PNG with an empty palette is enough, and the leaked bytes survive saving to PNG or GIF. In the runs examined, those bytes included memory addresses inside the stack, heap, libc, libpython and Pillow's own C modu

  4. Oct 26, 2026 · PyPA Advisory Database

    Fix available

    pillow fixed in 13.0.0

  5. Oct 26, 2026 · PyPA Advisory Database

    Fix available

    pillow fixed in 13.0.0

  6. Oct 26, 2026 · PyPA Advisory Database

    Updated

    When an application lets a user supply the palette image for Pillow's , the user can get back 512 bytes of the server process's stack memory in the pixels of the returned image. An 80-byte PNG with an empty palette is enough, and the leaked bytes survive saving to PNG or GIF. In the runs examined, those bytes included memory addresses inside the stack, heap, libc, libpython and Pillow's own C modu

Sources

  • CVE.orgVulnerability recordCVE-2026-112898

    Official CVE identifier

    cve.org
  • FIRST EPSSExploitation probabilityCVE-2026-112898

    30-day exploitation probability 0.34%

    first.org
  • GitHub Advisory DatabasePackage advisoryGHSA-rfgq-q3w2-pmv2

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

    github.com
  • GitLab Advisory DatabasePackage advisoryCVE-2026-112898

    ============================================================================ Image.quantize() with empty palette leaks uninitialized stack memory Location: src/libImaging/Palette.c:216 in ImagingPaletteCacheUpdate() Commit: a707c6b21c313880d0771e54965d142dd42358b6 ============================================================================ When an application lets a user supply the palette image f

    advisories.gitlab.com
  • NIST NVDVulnerability recordCVE-2026-112898

    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

    nvd.nist.gov
  • PyPA Advisory DatabasePackage advisoryGHSA-rfgq-q3w2-pmv2

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

    osv.dev

References

Freshness

Last verified in this catalog Oct 31, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.

  • FIRST EPSSOct 31, 2026
  • PyPA Advisory DatabaseOct 26, 2026
  • GitLab Advisory DatabaseOct 23, 2026
  • GitHub Advisory DatabaseOct 22, 2026
  • CVE.orgOct 21, 2026
  • NIST NVDOct 21, 2026