Heap-based Buffer Overflow Affecting pillow package, versions [,13.0.0)


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.32% (24th 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-21277802
  • published20 Oct 2026
  • disclosed19 Oct 2026
  • creditAlex Bouffard, pebwalker

Introduced: 19 Oct 2026

NewCVE-2026-112398  (opens in a new tab)
CWE-122  (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 Heap-based Buffer Overflow via the JPEG decoder in src/libImaging/JpegDecode.c when processing a JPEG stream whose declared output width or component count exceeds the dimensions used to size the scanline buffer. Because the buffer is sized from tile extents rather than the JPEG header, a JPEG stream with wider scanlines or more components than expected causes a write beyond the allocated buffer, allowing an attacker to achieve arbitrary code execution by supplying a malicious image file.

CVSS Base Scores

version 4.0
version 3.1