Out-of-bounds read in stable-diffusion.cpp safetensors loader
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- —
- Confidentiality · integrity · availability
- High · None · High
- Fix status
- No fix listed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA.
Summary
stable-diffusion.cpp before master-764-e22272e does not check that a tensor's data_offsets stay within the safetensors file's data section (CWE-125). A local attacker can supply a crafted .safetensors file that makes the library read adjacent process memory into tensor buffers or crash, once a user loads it.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
Description from the CNA
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
Update stable-diffusion.cpp to master-764-e22272e, the version that fixes this issue.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
Vendor assessments
Timeline
- 2026-11-05 Threatist record created from CVE-2026-70660
- 2026-11-06 Affected versions changed · Red Hat
- 2026-11-06 CVSS score added · Red Hat
- 2026-11-07 Priority changed: MEDIUM → LOW
References
Other 4
- https://github.com/leejet/stable-diffusion.cpp/security/advisories/GHSA-v2m4-h57v-fr6w
- https://github.com/leejet/stable-diffusion.cpp/pull/1754
- https://github.com/leejet/stable-diffusion.cpp/commit/e22272ee631b742dab4440c18eb8fcafb0689402
- https://github.com/leejet/stable-diffusion.cpp/releases/tag/master-764-e22272e
More leejet vulnerabilities
- TI-2026-35250 stable-diffusion.cpp: Heap buffer overflow in GLOBAL opcode parsing for PyTorch checkpoint files CVSS 3.1HIGH 7.8
- TI-2026-35249 stable-diffusion.cpp: Heap buffer overflow in SHORT_BINUNICODE parsing for PyTorch checkpoint files CVSS 3.1HIGH 7.8
- TI-2026-35247 stable-diffusion.cpp has a Heap-based Buffer Overflow CVSS 3.1HIGH 7.8
- TI-2026-35248 stable-diffusion.cpp: Out-of-bounds reads in PyTorch checkpoint pickle opcode parsing CVSS 3.1MEDIUM 5.5
- TI-2026-85479 Heap out-of-bounds write in stable-diffusion.cpp imatrix loader CVSS 3.1HIGH 7.8
Sources
- CVE-2026-70660 · CVE Program
- CVE-2026-70660 · NVD
- FIRST EPSS
- CVE-2026-70660 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences