CVE-2026-70659

stable-diffusion.cpp: Heap out-of-bounds write in the imatrix loader (`load_imatrix`) via a duplicate tensor name

7.8 high EPSS 0.17%

Published 5 Nov 2026 Updated 9 Nov 2026 CNA: GitHub_M

Check your servers for CVE-2026-70659

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-70659 affects stable-diffusion.cpp, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

stable-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.

Severity (CVSS)

7.8 high CVSS 3.1 from GitHub_M (CNA)
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
none: the attacker does not need an account
User interaction
required: a user has to do something, such as open a link or a file
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.17%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 6.08% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 9 Nov 2026):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
total: full control of the component or of its data

Weakness

  • CWE-787 Out-of-bounds Write
  • CWE-1284 Improper Validation of Specified Quantity in Input

Affected products

As the CNA lists them.

ProductVersions
stable-diffusion.cpp
affected < master-763-4fcc6fe

Is my server affected?

Find the installed version of stable-diffusion.cpp and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.

Debian, Ubuntu

dpkg -l | grep -i stable-diffusion.cpp
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2026-70659 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2026-70659

RHEL, Rocky, Alma, Fedora

rpm -q stable-diffusion.cpp
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2026-70659

Alpine

apk list --installed | grep -i stable-diffusion.cpp

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2026-70659
trivy image --scanners vuln IMAGE | grep CVE-2026-70659

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Advisories

Other references

Source: the record CVE-2026-70659 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.