Heap Memory Vulnerability in Pillow Imaging Library Affects Python Applications
CVE-2026-96778

7.7HIGH

Key Information:

Status
Vendor
CVE Published:
21 October 2026

What is CVE-2026-96778?

The Pillow imaging library, utilized for image processing in Python, contains a vulnerability that allows for heap memory corruption. Specifically, during the handling of JPEG images with ICC profiles, an attacker can exploit a flaw in the ImagingJpegEncode function. This occurs when the encoder buffer is filled to its limit, causing the free_in_buffer counter to wrap improperly. As a result, a crafted JPEG comment could overwrite adjacent heap memory, potentially leading to application crashes or arbitrary code execution. Users are strongly advised to upgrade to version 13.0.0 or later to mitigate this risk.

Affected Version(s)

Pillow >= 9.4.0, < 13.0.0

References

CVSS V4

Score:
7.7
Severity:
HIGH
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Network
Attack Complexity:
Low
Attack Required:
Physical
Privileges Required:
Undefined
User Interaction:
Unknown

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.