CVE-2026-96778

High 8.8 P4 · Monitor (12/100)
Other identifiers: GHSA-G7CR-3P24-7WF7

Pillow: Heap buffer overflow writing JPEG comment after ICC profile fills buffer

Published: 21.10.2026 · Last updated: 30.11.2026 22:23 UTC · Revision 1 · Sources: FIRST Exploit Prediction Scoring System (EPSS), GitHub Security Advisories, NIST National Vulnerability Database (NVD)

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 / productAffected versionsFixed inSource
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.013.0.0github

Versions as published. “Fixed in” only where a source names the version explicitly.

Recommended mitigation

Fixed versions: Pillow 13.0.0

Vendor patches and guidance

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