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.
Severity (CVSS)
| Base score | 6.9 |
|---|---|
| Severity | Medium |
| Version | CVSS 4.0 |
| Vector | 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 |
| Provided by | CNA |
Weaknesses
- CWE-125 — CWE-125: Out-of-bounds Read
Affected products
| Vendor | Product | Versions |
|---|---|---|
| leejet | stable-diffusion.cpp | < master-764-e22272e [affected] |
References
- https://github.com/leejet/stable-diffusion.cpp/security/advisories/GHSA-v2m4-h57v-fr6w (x_refsource_CONFIRM)
- https://github.com/leejet/stable-diffusion.cpp/pull/1754 (x_refsource_MISC)
- https://github.com/leejet/stable-diffusion.cpp/commit/e22272ee631b742dab4440c18eb8fcafb0689402 (x_refsource_MISC)
- https://github.com/leejet/stable-diffusion.cpp/releases/tag/master-764-e22272e (x_refsource_MISC)
Assess this vulnerability
Compare your deployed product and version with the source record. Review vendor references for fixes and workarounds. A CVSS score describes technical severity; it does not establish that your systems are affected or that exploitation has occurred.
Browse all CVE security advisories · Symaro cybersecurity services
Generated from the official CVE List on 06 Nov 2026 08:03 UTC.