CVE-2026-112403
Received Received - Intake

Pillow JPEG Decoder Heap Corruption via SOF3

Vulnerability report for CVE-2026-112403, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-19

Last updated on: 2026-10-19

Assigner: GitHub, Inc.

Description

Pillow is a Python imaging library. Prior to 13.0.0, Pillow's JPEG decoder can write a full-width scanline into a buffer sized for a requested draft scale. ImagingJpegDecode does not verify libjpeg's actual output width and component count after scaling is requested, and an 8-bit lossless SOF3 JPEG decoded by a build linked to libjpeg-turbo 3.x can ignore the requested downscaling geometry. An attacker can supply such a JPEG to an application that uses draft() or thumbnail() to request downscaling. This can corrupt heap memory, crash the process, or potentially allow code execution. Older libjpeg-turbo 2.x and IJG builds reject the SOF3 input. This issue is fixed in version 13.0.0.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-19
Last Modified
2026-10-19
Generated
2026-10-20
AI Q&A
2026-10-20
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
python-pillow Pillow < 13.0.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-122 A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

Pillow before 13.0.0 has a flaw in its JPEG decoder where it can write a full-width scanline into a buffer sized for downscaled output. This happens because the decoder does not verify the actual output width or component count after scaling is requested. An attacker can exploit this by providing a specially crafted JPEG file to an application using draft() or thumbnail() functions, leading to heap memory corruption, crashes, or potential code execution.

Impact Analysis

This vulnerability can impact you by causing application crashes, corrupting data, or allowing attackers to execute arbitrary code on your system. If you use Pillow to process JPEG images with downscaling, an attacker could exploit this to compromise your application or system.

Mitigation Strategies

Upgrade Pillow to version 13.0.0 or later to address the vulnerability. If using libjpeg-turbo 3.x, ensure the application does not process SOF3 JPEG files with draft() or thumbnail() functions until updated.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-112403. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart