Skip to content
HighVulnerability

CVE-2026-70659: stable-diffusion.cpp heap overflow when loading imatrix files

Identifier
CVE-2026-70659
Published
Record updated
View JSON
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.2%Estimated probability that this CVE is exploited in the next 30 days, from the FIRST Exploit Prediction Scoring System. Read on .

Summary

stable-diffusion.cpp, a pure C/C++ library for diffusion model inference, has a heap overflow in IMatrixCollector::load_imatrix (src/runtime/imatrix.cpp) from master-742-1a13107 through master-763-4fcc6fe. Reusing the values and counts vectors for same-named tensor entries lets a crafted untrusted .imatrix file write attacker-controlled values past both heap buffers. Loading it through the --imat-in conversion path can corrupt the heap or crash the process before any model is needed.

Mitigation

Fixed in master-763-4fcc6fe.