Back to CVE records
High 7.7Published Oct 21, 2026

CVE-2026-96778Pillow: Heap buffer overflow writing JPEG comment after ICC profile fills buffer

Updated under an hour ago ()

Does this affect you?

It affects python-pillow Pillow and 1 other product. Add what you run to find out whether that includes you.

EPSS puts the chance of exploitation in the next 30 days at 0.50%, higher than 43% of scored CVEs.

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
7.7 HIGH (v4.0, CNA)CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Weakness (CWE)
CWE-787
Known exploited
Not in CISA's KEV catalog
EPSS (exploitation in the next 30 days)
0.50% (percentile 43)
Assigned by
GitHub_M
NVD analysis
Modified
Record last updated
Oct 27, 2026
First seen by InfoSec Signals
Oct 21, 2026

Affected products

Affected products
python-pillow Pillow
python_pillow:pillow (from the name)
from 9.4.0, < 13.0.0
CNA record
python pillow
python:pillow
from 9.4.0 before 13.0.0
NVD

References

References

The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.

Your cookie choices
We use essential cookies to run this site, and, only with your consent, an advertising cookie from Google to measure whether our ads lead to sign-ups and subscriptions. See our for details.