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-21277783
  • published20 Oct 2026
  • disclosed19 Oct 2026
  • creditClaude (Anthropic), DavidKorczynski

Introduced: 19 Oct 2026

NewCVE-2026-112403  (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 ImagingJpegDecode in src/libImaging/JpegDecode.c when processing a JPEG file whose header declares scanlines wider or with more components than the tile extents used to size the scanline buffer. Because the buffer is sized from tile extents rather than the JPEG header, libjpeg can write beyond the allocated buffer, allowing an attacker who supplies a malicious JPEG image to achieve a heap buffer overflow with potential for arbitrary code execution.

CVSS Base Scores

version 4.0
version 3.1