CVE-2026-96778
8.8 HIGHpublic exploit availablePublished 2026-10-21 · Updated 2026-10-28
AI risk analysis
- Summary
- A heap-based buffer overflow in Pillow's JPEG encoder allows an attacker to overwrite adjacent heap memory by crafting a JPEG with a precisely-sized ICC profile and a forwarded comment, leading to crashes or potential code execution when re-saving untrusted images.
- Exploitability
- Exploitation requires the victim to re-save an untrusted JPEG image while preserving its ICC profile and comment, and relies on specific heap layout conditions for reliable code execution.
- Blast radius
- Successful exploitation could lead to remote code execution in the context of the application using Pillow (e.g., a web service processing user uploads), compromising confidentiality, integrity, and availability.
- Detection
- No reliable host or network indicator is derivable from the published description.
- Prioritized remediation
- Upgrade to Pillow version 13.0.0 or later.
Analysis generated locally by garnet-coder (no data left the box). AI-assisted — verify against primary sources before acting.
NVD description
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weaknesses
CWE-787
Vendors
python
Products
pillow
Public exploit & PoC references
- https://github.com/python-pillow/Pillow/commit/02561b8dc6117d5670d4b469fecdd02c70854f9b[Patch]
- https://github.com/python-pillow/Pillow/pull/10124[Issue Tracking]
- https://github.com/python-pillow/Pillow/releases/tag/13.0.0[Release Notes]
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-g7cr-3p24-7wf7[Vendor Advisory]
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-g7cr-3p24-7wf7[Vendor Advisory]
All references
- https://github.com/python-pillow/Pillow/commit/02561b8dc6117d5670d4b469fecdd02c70854f9b
- https://github.com/python-pillow/Pillow/pull/10124
- https://github.com/python-pillow/Pillow/releases/tag/13.0.0
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-g7cr-3p24-7wf7
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-g7cr-3p24-7wf7
Source data: NVD (nvd.nist.gov), public domain. Exploit-DB.ai adds local AI analysis for defensive use only.
Related CVEs
- HIGHCVE-2026-120431
- HIGHCVE-2026-120436
- HIGHCVE-2017-20286PoC
- HIGHCVE-2026-102566PoC
- HIGHCVE-2026-104061PoC
- HIGHCVE-2026-104062PoC
- HIGHCVE-2026-104065PoC
- HIGHCVE-2026-104066PoC
Related by shared AI tags and CWE weakness class. Browse the full archive.