Pillow is a Python imaging library. From 9.4.0 until 13.0.0, ImagingJpegEncode() in src/libImaging/JpegEncode.c can call jpeg_write_marker() for a JPEG COM comment when an ICC profile has exactly filled the 65536-byte encoder buffer. libjpeg writes one byte before checking the exhausted free_in_buffer counter, which then wraps and permits the attacker-controlled comment and subsequent compressed image data to overwrite adjacent heap memory. Re-saving an untrusted image as JPEG while preserving its ICC profile and forwarded comment can crash the process and may enable code execution in suitable runtime and heap layouts. This issue is fixed in version 13.0.0.
References
Configurations
History
28 Oct 2026, 02:17
| Type | Values Removed | Values Added |
|---|---|---|
| References | () https://github.com/python-pillow/Pillow/security/advisories/GHSA-g7cr-3p24-7wf7 - Vendor Advisory |
27 Oct 2026, 14:27
| Type | Values Removed | Values Added |
|---|---|---|
| First Time |
Python
Python pillow |
|
| CPE | cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:* | |
| References | () https://github.com/python-pillow/Pillow/commit/02561b8dc6117d5670d4b469fecdd02c70854f9b - Patch | |
| References | () https://github.com/python-pillow/Pillow/pull/10124 - Issue Tracking | |
| References | () https://github.com/python-pillow/Pillow/releases/tag/13.0.0 - Release Notes | |
| References | () https://github.com/python-pillow/Pillow/security/advisories/GHSA-g7cr-3p24-7wf7 - Vendor Advisory | |
| CVSS |
v2 : v3 : |
v2 : unknown
v3 : 8.8 |
21 Oct 2026, 21:20
| Type | Values Removed | Values Added |
|---|---|---|
| New CVE |
Information
Published : 2026-10-21 21:20
Updated : 2026-10-28 02:17
NVD link : CVE-2026-96778
Mitre link : CVE-2026-96778
CVE.ORG link : CVE-2026-96778
JSON object : View
Products Affected
python
- pillow
CWE
CWE-787
Out-of-bounds Write
