Skip to content
HighVulnerability

CVE-2026-47747: stable-diffusion.cpp heap buffer overflow in pickle .ckpt parser

Identifier
CVE-2026-47747
Published
Record updated
View JSON
Fixed in
The source references a patch, a mitigation or a vendor advisory.

Summary

CVE-2026-47747 affects stable-diffusion.cpp, a pure C/C++ library for diffusion model inference, in versions before master-584-0a7ae07. A heap buffer overflow in the BINUNICODE opcode handler of the pickle .ckpt parser in src/model.cpp results from sign confusion on the opcode length field. A crafted .ckpt file can trigger memcpy with a very large length derived from a negative signed value, causing immediate heap corruption.

Mitigation

Fixed in master-584-0a7ae07. If immediate updating is not possible, only load .ckpt checkpoint files from trusted sources, prefer trusted model sources, and use safer formats such as .safetensors where possible.