CVE-2026-70660
6.9medium
stable-diffusion.cpp: Out-of-bounds read in safetensors loader: unvalidated data_offsets allow a tensor's byte range to extend past the end of the file
- Severity
- 6.9medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.18% (higher than 5% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
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. 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| leejet stable-diffusion.cpp | < master-764-e22272e | CVE List |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-70660 changed 2026-11-09 | CVE Terms of Use |
| NVD | CVE-2026-70660 changed 2026-11-12 | Public domain |