Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

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

Quick assessment

Affected
python-pillow Pillow
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Pillow 是一个 Python 图像处理库。在 9.4.0 至 13.0.0 版本中, 文件中的 函数会在 ICC 配置文件恰好填满 65536 字节的编码器缓冲区时,调用 来写入 JPEG COM 注释。由于 libjpeg 在检查 计数器是否耗尽之前会先写入一个字节,导致该计数器发生回绕(wrap),从而允许攻击者控制的注释及随后的压缩图像数据覆盖相邻的堆内存。将不受信任的图像重新保存为 JPEG 格式(同时保留其 ICC 配置文件和转发的注释)可能导致进程崩溃,并在特定的运行时环境和堆布局下实现代码执行。

CVSS 7.7 · High

Possible ATT&CK Techniques 1 AI

T1190 · Exploit Public-Facing Application
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-96778

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Pillow: Heap buffer overflow writing JPEG comment after ICC profile fills buffer
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
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
Source: CVE Program / CVE List V5
Vulnerability Type
跨界内存写
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
python-pillow Pillow >= 9.4.0, < 13.0.0 -

II. Public POCs for CVE-2026-96778

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-96778

请登录查看更多情报信息。

Patches & Fixes for CVE-2026-96778 (2)

Vendor Advisories for CVE-2026-96778 (1)

Vendor Pages for CVE-2026-96778 (1)

Same Patch Batch · python-pillow · 2026-10-21 · 11 CVEs total

CVE-2026-96639 9.8 CRITICAL Pillow multi-frame loaders can reuse stale native image storage after mode transitions
CVE-2026-96640 8.2 HIGH Pillow PDF append accepts malformed shared page-tree DAG causing resource exhaustion
CVE-2026-96642 7.1 HIGH Pillow: TarIO negative size field causes infinite CPU-spin loop
CVE-2026-96643 7.1 HIGH Pillow: PNG eXIf chunk makes EXIF parsing run in quadratic time
CVE-2026-96644 7.1 HIGH Pillow: Heap over-read in WMF/EMF rendering via 16-bit dimension truncation (Windows build
CVE-2026-96637 7.1 HIGH Pillow: Decompression bomb check bypass in SpiderImagePlugin.seek() leads to unbounded all
CVE-2026-96638 6.5 MEDIUM Pillow: BMP RLE decoder memory-amplification DoS via unbounded delta escape / absolute mod
CVE-2026-96641 6.5 MEDIUM Pillow: Reachable undefined behavior in native integer operations, potentially leading to
CVE-2026-96636 6.5 MEDIUM Pillow: Decompression-bomb protection bypass via multi-frame seek() in MPO and DCX (MpoIma
CVE-2026-114501 6.3 MEDIUM Pillow: Arrow export leaks stale heap memory when PILLOW_ALIGNMENT > 1

IV. Related Vulnerabilities

V. Comments for CVE-2026-96778

No comments yet


Leave a comment