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

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-59197— Pillow: Heap out-of-bounds write in Pillow `ImageFilter.RankFilter` via integer overflow in `ImagingExpand`

Quick assessment

Affected
python-pillow Pillow
Exploitation
Public or AI PoC available; prioritize validation
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

python-pillow Pillow是python-pillow的图像处理库。 python-pillow Pillow 12.3.0之前版本存在安全漏洞,该漏洞源于公共rank-filter API在给定非常大奇数滤镜大小时会触发原生堆越界写入,因为ImageFilter.RankFilter.filter()在rank-filter大小验证前调用image.expand(size // 2, size // 2),且ImagingExpand()使用未检查的有符号整数运算计算输出维度。

CVSS 8.2 · High EPSS 0.45% · P37

Possible ATT&CK Techniques 1 AI

T1203 · Exploitation for Client Execution

Affected Version Matrix 1

VendorProduct Version RangeStatus
python-pillow Pillow < 12.3.0 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-59197

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 out-of-bounds write in Pillow `ImageFilter.RankFilter` via integer overflow in `ImagingExpand`
Source: CVE Program / CVE List V5
Vulnerability Description
Pillow is a Python imaging library. Prior to 12.3.0, Pillow's public rank-filter API can trigger a native heap out-of-bounds write when given a very large odd filter size because ImageFilter.RankFilter.filter() calls image.expand(size // 2, size // 2) before rank-filter size validation and ImagingExpand() computes output dimensions with unchecked signed int arithmetic. This issue is fixed in version 12.3.0.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
跨界内存写
Source: CVE Program / CVE List V5
Vulnerability Title
python-pillow Pillow 数字错误漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
python-pillow Pillow是python-pillow的图像处理库。 python-pillow Pillow 12.3.0之前版本存在安全漏洞,该漏洞源于公共rank-filter API在给定非常大奇数滤镜大小时会触发原生堆越界写入,因为ImageFilter.RankFilter.filter()在rank-filter大小验证前调用image.expand(size // 2, size // 2),且ImagingExpand()使用未检查的有符号整数运算计算输出维度。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
python-pillow Pillow < 12.3.0 -

II. Public POCs for CVE-2026-59197

# POC Description Source Link Shenlong Link
AI-Generated POC Premium
Qwen3.6-35B-A3B · 6163 chars
Pro+ exclusive includes:
Vulnerability reproduction recording (real sandbox build + trigger, exclusive)
In-depth vulnerability mechanism
Trigger conditions & impact
Full executable POC code
Exploit chain & mitigation
POC zip download
100+ AI POC generations per month

III. Intelligence Information for CVE-2026-59197

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

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

Vendor Advisories for CVE-2026-59197 (1)

Vendor Pages for CVE-2026-59197 (1)

Same Patch Batch · python-pillow · 2026-07-14 · 8 CVEs total

CVE-2026-59199 7.5 HIGH Pillow: Heap out-of-bounds write `Image.paste()` / `Image.crop()` via signed coordinate ov
CVE-2026-59205 7.5 HIGH Pillow: Controlled heap out-of-bounds write in `ImageCmsTransform.apply()` via output mode
CVE-2026-59200 7.5 HIGH Pillow: Decompression Bomb DoS via PdfParser.PdfStream.decode()
CVE-2026-59198 6.5 MEDIUM Pillow TGA RLE encoder can serialize up to ~57 KB of adjacent heap data into generated ima
CVE-2026-59203 5.3 MEDIUM Pillow EpsImagePlugin negative %%BeginBinary byte count causes infinite loop denial of ser
CVE-2026-59204 Pillow JPEG2000 tiled decode retains a growing scratch buffer and can be used for denial o
CVE-2026-54058 Pillow: Out-of-bounds read via attacker-controlled row stride on Pillow's mmap path (McIda

IV. Related Vulnerabilities

V. Comments for CVE-2026-59197

No comments yet


Leave a comment