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

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-47747— stable-diffusion.cpp has a Heap-based Buffer Overflow

Quick assessment

Affected
leejet stable-diffusion.cpp
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.

stable-diffusion.cpp是leejet个人开发者的一种基于C++的纯推理扩散模型实现。 leejet stable-diffusion.cpp存在缓冲区错误漏洞,该漏洞源于src/model.cpp中pickle .ckpt解析器的BINUNICODE操作码处理程序存在堆缓冲区溢出,由操作码长度字段的符号混乱导致,特制.ckpt文件可能触发memcpy使用负值推导出的超大长度,导致堆破坏。

CVSS 7.8 · High EPSS 0.18% · P8

Affected Version Matrix 1

VendorProduct Version RangeStatus
leejet stable-diffusion.cpp < master-584-0a7ae07 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-47747

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
stable-diffusion.cpp has a Heap-based Buffer Overflow
Source: CVE Program / CVE List V5
Vulnerability Description
stable-diffusion.cpp is a pure C/C++ library for running diffusion model (Stable Diffusion, Flux, Wan, Qwen Image, Z-Image, and more) inference. In versions prior to master-584-0a7ae07, the pickle .ckpt parser in src/model.cpp contained a heap buffer overflow vulnerability in the BINUNICODE opcode handler. The issue was caused by sign confusion on the opcode length field. A crafted .ckpt file could trigger memcpy with a very large length derived from a negative signed value, causing immediate heap corruption. The issue has been resolved in version master-584-0a7ae07. If developers are unable to immediately update their applications they can work around this issue by only loading .ckpt checkpoint files from trusted sources and preferring trusted model sources and safer formats such as .safetensors where possible.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
堆缓冲区溢出
Source: CVE Program / CVE List V5
Vulnerability Title
leejet stable-diffusion.cpp 缓冲区错误漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
stable-diffusion.cpp是leejet个人开发者的一种基于C++的纯推理扩散模型实现。 leejet stable-diffusion.cpp存在缓冲区错误漏洞,该漏洞源于src/model.cpp中pickle .ckpt解析器的BINUNICODE操作码处理程序存在堆缓冲区溢出,由操作码长度字段的符号混乱导致,特制.ckpt文件可能触发memcpy使用负值推导出的超大长度,导致堆破坏。
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
leejet stable-diffusion.cpp < master-584-0a7ae07 -

II. Public POCs for CVE-2026-47747

# POC Description Source Link Shenlong Link
AI-Generated POC Premium
Qwen3.6-35B-A3B · 10731 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-47747

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

Patches & Fixes for CVE-2026-47747 (1)

Vendor Advisories for CVE-2026-47747 (1)

Same Patch Batch · leejet · 2026-06-16 · 4 CVEs total

CVE-2026-47749 7.8 HIGH stable-diffusion.cpp: Heap buffer overflow in SHORT_BINUNICODE parsing for PyTorch checkpo
CVE-2026-47750 7.8 HIGH stable-diffusion.cpp: Heap buffer overflow in GLOBAL opcode parsing for PyTorch checkpoint
CVE-2026-47748 5.5 MEDIUM stable-diffusion.cpp: Out-of-bounds reads in PyTorch checkpoint pickle opcode parsing

IV. Related Vulnerabilities