CVE-2026-70660
stable-diffusion.cpp is a pure C/C++ library for running diffusion …
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.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Set the orderSystems that can be reached from the internet come first, then the rest.
References
- github.com/leejet/stable-diffusion.cpp/commit/e22272ee631b742dab4440c18eb8fcafb0689402
- github.com/leejet/stable-diffusion.cpp/pull/1754
- github.com/leejet/stable-diffusion.cpp/releases/tag/master-764-e22272e
- github.com/leejet/stable-diffusion.cpp/security/advisories/GHSA-v2m4-h57v-fr6w
- nvd.nist.gov/vuln/detail/CVE-2026-70660
- cve.org/CVERecord?id=CVE-2026-70660
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.