CVE-2026-47747

stable-diffusion.cpp has a Heap-based Buffer Overflow

HIGH
7.8
CVSS Score
Published: June 16, 2026 at 06:32 PM UTC
Updated: October 25, 2026 at 11:10 PM UTC
1 product affected across 1 vendorStable Diffusion.cpp

Using stable-diffusion.cpp by leejet?

Get instant alerts when new vulnerabilities affect stable-diffusion.cpp - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.2%
SSVC
PoC

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

All versionsv < master-584-0a7ae07
Affected range stops below master-584-0a7ae07, so it looks safe — our inference, not a vendor statement

References (3)

x_refsource_CONFIRMExploitMitigationVendor Advisory
Source: cverecord
https://github.com/leejet/stable-diffusion.cpp/security/advisories/GHSA-mghm-5mqc-pwmp
x_refsource_MISCIssue TrackingPatch
Source: cverecord
https://github.com/leejet/stable-diffusion.cpp/pull/1443

SSVC — Action Prioritization

SSVCPoCNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.8HIGHGitHub_M
Attack Vector
LOCAL
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-122CWE-787

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card