CVE-2026-96778
High 8.8 P4 · Monitor (12/100)Pillow: Heap buffer overflow writing JPEG comment after ICC profile fills buffer
Confirmed facts from the sources
- CVSS
- 8.8 (High) · CVSS 3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Scored by nvd@nist.gov - Exploitation confirmed
- Not in the CISA KEV catalog
- Exploitation estimated (EPSS)
- 0.62 % · percentile 44.0 % (as of 30.11.2026)
Probability of exploitation in the next 30 days – an estimate by FIRST, not confirmation. - Public exploit
- No reference to a public exploit.
- Fix
- Fix available
- Monitored technologies
- No monitored technology
Description (source)
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.
Affected products and versions
| Vendor / product | Affected versions | Fixed in | Source |
|---|---|---|---|
| python-pillow Pillow | = >= 9.4.0, < 13.0.0 | — | nvd |
| python pillow | >= 9.4.0, < 13.0.0 | — | nvd |
| pip: Pillow | >= 9.4.0, < 13.0.0 | 13.0.0 | github |
Versions as published. “Fixed in” only where a source names the version explicitly.
Recommended mitigation
Fixed versions: Pillow 13.0.0
- github.com (Patch)
In general: check your versions, update to a fixed version, limit exposure until then and follow the vendor guidance.
AI interpretation
No AI interpretation yet – it is created for urgent advisories of monitored technologies. The facts above apply regardless.
Why this priority?: P4 · Monitor (12/100)
- Estimated exploitation probability 0.62 % (EPSS, percentile 44 %) – an estimate, not confirmation (+0)
- Technical severity: CVSS 8.8 (HIGH) – on its own not a reason for top priority (+12)
- Fix available – plan the update (+0)
Priority is a general assessment from CVSS, KEV, EPSS, exploits, relevance and fix availability. Whether a specific environment is affected depends on its versions, configuration and exposure.
Original advisories and links
- Advisory https://github.com/python-pillow/Pillow/security/advisories/GHSA-g7cr-3p24-7wf7 · security-advisories@github.com
- Advisory https://nvd.nist.gov/vuln/detail/CVE-2026-96778 · nvd
- Advisory https://github.com/advisories/GHSA-g7cr-3p24-7wf7 · github
- Patch https://github.com/python-pillow/Pillow/commit/02561b8dc6117d5670d4b469fecdd02c70854f9b · security-advisories@github.com
- Reference https://github.com/python-pillow/Pillow/pull/10124 · security-advisories@github.com
- Reference https://github.com/python-pillow/Pillow/releases/tag/13.0.0 · security-advisories@github.com