Unknown · Stable-Diffusion.Cpp · CVE-2026-47748
**Name of the Vulnerable Software and Affected Versions**
stable-diffusion.cpp versions prior to master-584-0a7ae07
**Description**
An out-of-bounds read error exists during PyTorch checkpoint pickle opcode parsing. The pickle .ckpt parser in the `src/model.cpp` file fails to consistently verify that sufficient input remains before reading opcode arguments or advancing the parser buffer. Specifically, opcode handlers advance the parser position using expressions like `buffer += N` without confirming that `buffer + N <= buffer end`. A crafted or truncated .ckpt file can trigger reads beyond the end of the metadata buffer, potentially leading to application crashes when loading untrusted model files from sources such as model sharing sites.
**Recommendations**
Update to version master-584-0a7ae07.
As a temporary workaround, avoid loading .ckpt checkpoint files from untrusted sources and prefer safer formats such as .safetensors.