Out-of-bounds Read Affecting pillow package, versions [,13.0.0)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.29% (21st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-PILLOW-21277793
  • published20 Oct 2026
  • disclosed19 Oct 2026
  • creditTomer Fichman

Introduced: 19 Oct 2026

NewCVE-2026-112896  (opens in a new tab)
CWE-125  (opens in a new tab)

How to fix?

Upgrade pillow to version 13.0.0 or higher.

Overview

Affected versions of this package are vulnerable to Out-of-bounds Read via the TIFF image encoder in TiffImagePlugin.py and src/encode.c, where the ColorMap length is not validated against the BitsPerSample tag value. Prior to the fix, the encoder hardcoded a requirement of 768 entries (suitable only for 8-bit images) and did not enforce the correct length of (1 << BitsPerSample) * 3 entries for other bit depths. An attacker can supply a TIFF image with a mismatched ColorMap length relative to BitsPerSample, triggering a crash in the encoder and causing a denial of service. Additionally, the low-confidentiality impact reflects potential out-of-bounds read exposure from the incorrectly sized colormap buffer.

CVSS Base Scores

version 4.0
version 3.1