CVE-2026-70660: stable-diffusion.cpp safetensors buffer overflow [data offset validation]

CVE-2026-70660 · Severity: info · Published 2026-11-05

stable-diffusion.cpp is a C/C++ library used to run AI image generation models like Stable Diffusion. A crafted model file can cause the library to read from invalid memory locations when loading, potentially exposing sensitive data from the application's memory or crashing the program. This occurs when processing specially crafted model files that declare data sections outside the file's actual boundaries.

Technologies: Leejet Stable-Diffusion.Cpp. Vendors: Leejet.

Quick answers

Is CVE-2026-70660 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-70660 being exploited in the wild.
How severe is CVE-2026-70660?
Informational severity, published 5 November 2026.
Which products and versions are affected?
Leejet Stable-Diffusion.Cpp prior to master-764-e22272e.
Is there a fix for CVE-2026-70660?
Yes: fixed in master-764-e22272e. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-70660 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-70660?
Check whether you run Leejet Stable-Diffusion.Cpp at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Fixed in: master-764-e22272e

Technical details

The safetensors file loader in src/model_io/safetensors_io.cpp performs insufficient validation of tensor data_offsets, checking only that nbytes equals end - begin without verifying the offsets remain within the file's data section. A crafted .safetensors file can declare a byte range extending past the file boundary, causing src/model_loader.cpp to read an attacker-controlled length from an unmapped offset. This allows arbitrary memory read or process crash. The fix validates that tensor offsets stay within declared file data boundaries.

Affected products

  • leejet stable-diffusion.cpp prior to master-764-e22272e

Timeline

  • 2026-11-05: advisory

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.