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.33% (26th 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-21430916
  • published22 Oct 2026
  • disclosed21 Oct 2026
  • creditJoshua Rogers

Introduced: 21 Oct 2026

NewCVE-2026-96644  (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

Pillow is a PIL (Python Imaging Library) fork.

Affected versions of this package are vulnerable to Out-of-bounds Read via the PyImaging_DrawWmf function in src/display.c when processing a WMF image with dimensions exceeding 65535. The bcWidth and bcHeight fields in BITMAPCOREHEADER are 16-bit unsigned integers, so values larger than 65535 silently truncate on assignment while the subsequent PyBytes_FromStringAndSize call still uses the untruncated values, causing a heap buffer over-read that crashes the process. An attacker can trigger this by supplying a WMF file with oversized width or height values.

CVSS Base Scores

version 4.0
version 3.1