Heap Corruption in IMatrixCollector Load Method of Diffusion Model Library
CVE-2026-70659
7.8HIGH
What is CVE-2026-70659?
A vulnerability in the IMatrixCollector::load_imatrix function of the stable-diffusion.cpp library allows for heap corruption due to improper handling of values and counts vectors. When an untrusted .imatrix file is loaded, the function can allow an accumulation loop to overwrite heap memory with attacker-controlled values, potentially leading to a crash or arbitrary code execution. This issue has been addressed in the latest version of the library.
Affected Version(s)
stable-diffusion.cpp < master-763-4fcc6fe
