{"id":"CVE-2026-70660","aliases":["CVE-2026-70660"],"related":[],"kind":"vulnerability","state":"published","title":"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","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"}],"published":"2026-11-05T15:27:53.815Z","modified":"2026-11-12T22:18:35.610Z","severity":{"scorer":"GitHub_M","scheme":"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","score":6.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"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","score":6.9,"rating":"MEDIUM"}],"cwes":["CWE-125"],"affected":[{"ranges":[{"version":"< master-764-e22272e","status":"affected"}],"vendor":"leejet","product":"stable-diffusion.cpp","source":"cvelist"}],"references":[{"url":"https://github.com/leejet/stable-diffusion.cpp/security/advisories/GHSA-v2m4-h57v-fr6w","tags":["exploit","x-refsource-confirm"],"sources":["cvelist","nvd"]},{"url":"https://github.com/leejet/stable-diffusion.cpp/pull/1754","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/leejet/stable-diffusion.cpp/commit/e22272ee631b742dab4440c18eb8fcafb0689402","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/leejet/stable-diffusion.cpp/releases/tag/master-764-e22272e","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-11-09T17:13:04.609Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-70660","url":"https://www.cve.org/CVERecord?id=CVE-2026-70660","licence":"CVE Terms of Use","modified":"2026-11-09T17:13:40.694Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-70660","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-70660","licence":"Public domain","modified":"2026-11-12T22:18:35.610Z"}],"updatedAt":"2026-11-25T22:59:49.128Z","epss":{"score":0.00182,"percentile":0.04572,"date":"2026-11-30T12:00:22.000Z"}}