CVE Database›CVE-2026-112403

CVE-2026-112403

pillow: Pillow: Heap buffer overflow in ImagingJpegDecode

Loading…

Severity

Important

Red Hat Product Security

8.1

CVSS 3.1

Review impact separately from score.

Published · October 20, 2026

Updated · October 31, 2026

Description

A flaw was found in Pillow. A remote attacker could exploit this vulnerability to achieve arbitrary code execution or cause a Denial of Service (DoS) by supplying a specially crafted lossless JPEG image to an application that downscales images or generates thumbnails. This issue occurs because the JPEG decoder fails to verify actual output dimensions against the allocated memory buffer during scaling, causing full-width image data to be written beyond buffer boundaries. Successful exploitation leads to heap memory corruption, resulting in an application crash or potential code execution.

Statement

The overflow only triggers when the application calls draft() or thumbnail() before loading the image. Direct Image.open().load() or Image.open().resize() decode at scale 1 and are unaffected. Many image processing pipelines use load() followed by resize(), not thumbnail(). The libjpeg-turbo 3.x requirement, specific code path, and dimension threshold make this not easily exploitable across the entire Pillow install base.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

No mitigation is specified in collected source.

CVSS / CWE

CVSS 3.1 · 8.1
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

CWE-787 · Out-of-bounds Write