CVE-2026-70659 · AI agents & MCP
NO FIX YET · SEE WHAT TO DO
stable-diffusion.cpp is a C/C++ library for running image diffusion models such as Stable Diffusion and Flux. A crafted .imatrix file loaded through the --imat-in conversion path can make the loader write past heap buffers, corrupting memory or crashing the process.
first public Sep 27, 2026 · 1 source
Check it with your coding agent
It checks your repository and tells you if you’re affected, with the fix.
Teams that run stable-diffusion.cpp's conversion path with the --imat-in option on importance-matrix files they did not create or cannot verify. The sources describe a crash or heap corruption when such a file is loaded before any model is required. Teams that never use --imat-in or only load trusted imatrix files can skip it.
Not affected if no-imat-in-usage, trusted-imatrix-files-only
Who cares diffusion-models, ggml, stable-diffusion.cpp
master-742-1a13107 up to but not including master-763-4fcc6fe--imat-in on any .imatrix file that is not trustedmaster-763-4fcc6fe or laterstable-diffusion.cpp is a pure C/C++ library for running diffusion model (Stable Diffusion, Flux, Wan, Qwen Image, Z-Image, and more) inference. From master-742-1a13107 until master-763-4fcc6fe, IMatrixCollector::load_imatrix in src/runtime/imatrix.cpp reuses the values and counts vectors for entries with the same tensor name but resizes them only when they are empty. An untrusted .imatrix file can provide a small nval for the first entry and a larger nval for a second entry with the same name, causing the accumulation loop to write attacker-controlled floating-point and integer values beyond both heap buffers. Loading the file through the --imat-in conversion path can corrupt the heap or crash the process before a model is required. This issue is fixed in master-763-4fcc6fe.
Are you affected?
Tell InfraStack what you run. It checks this one, and every next one, against your stack.
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.