CVE-2026-70660 · AI agents & MCP
NO FIX YET · SEE WHAT TO DO
stable-diffusion.cpp is a C/C++ library for running image diffusion models such as Stable Diffusion and Flux. A crafted .safetensors model file can declare tensor byte ranges past the end of the file, so loading it can read adjacent process memory into tensor buffers or crash the process.
first public Sep 27, 2026 · 1 source
Check it with your coding agent
It checks your repository and tells you if you’re affected, with the fix.
Applications that embed stable-diffusion.cpp and load .safetensors model files, especially files from outside sources. Systems that only load models you built or vetted yourself are much less exposed. Teams using a different inference stack can skip it.
Not affected if not-using-stable-diffusion-cpp, trusted-models-only
Who cares c++, diffusion-models, safetensors, stable-diffusion.cpp
master-764-e22272e.master-764-e22272e or later, per the vendor's patch.stable-diffusion.cpp is a pure C/C++ library for running diffusion model (Stable Diffusion, Flux, Wan, Qwen Image, Z-Image, and more) inference. Prior to master-764-e22272e, the safetensors loader in src/model_io/safetensors_io.cpp trusts each tensor's data_offsets after checking only that nbytes equals end - begin. A crafted .safetensors file can declare a byte range beyond the file's data section, causing src/model_loader.cpp to consume an attacker-chosen length from an unchecked mapped-file offset. Loading the model can read adjacent process memory into tensor buffers or crash the process. This issue is fixed in master-764-e22272e.
Are you affected?
Tell InfraStack what you run. It checks this one, and every next one, against your stack.
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
This page as .md · .json · CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.