CVE-2026-70660
Awaiting Analysis Awaiting Analysis - Queue

Buffer Overflow in Stable Diffusion.cpp Safetensors Loader

Vulnerability report for CVE-2026-70660, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-05

Last updated on: 2026-11-12

Assigner: GitHub, Inc.

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. Prior to master-764-e22272e, the safetensors loader in src/model_io/safetensors_io.cpp trusts each tensor's data_offsets after checking only that nbytes equals end - begin. A crafted .safetensors file can declare a byte range beyond the file's data section, causing src/model_loader.cpp to consume an attacker-chosen length from an unchecked mapped-file offset. Loading the model can read adjacent process memory into tensor buffers or crash the process. This issue is fixed in master-764-e22272e.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-05
Last Modified
2026-11-12
Generated
2026-11-14
AI Q&A
2026-11-05
EPSS Evaluated
2026-11-13
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
leejet stable-diffusion.cpp < master-764-e22272e

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-125 The product reads data past the end, or before the beginning, of the intended buffer.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is an out-of-bounds read in the safetensors loader of stable-diffusion.cpp. The loader fails to validate that tensor data offsets lie within the file's data section. A crafted .safetensors file can declare a byte range beyond the file's end, causing the loader to read adjacent process memory into tensor buffers or crash the process.

Detection Guidance

Detecting this vulnerability requires checking the version of stable-diffusion.cpp in use. Compare your installed version against master-764-e22272e or later. If using a vulnerable version, inspect any .safetensors files loaded by the application for malformed headers or data offsets. Use commands like 'git log' or 'git rev-parse HEAD' to check the commit hash of the library.

Impact Analysis

This vulnerability can cause process crashes (denial of service) or expose adjacent process memory in tensor buffers. Attackers could exploit it by providing malformed .safetensors files to trigger these issues during model loading.

Compliance Impact

This vulnerability could potentially impact compliance with GDPR and HIPAA by enabling unauthorized memory access. An out-of-bounds read may expose sensitive process memory, which could include personal data or protected health information if the application handles such data. This violates principles of data integrity and confidentiality required by these regulations.

Mitigation Strategies

Update stable-diffusion.cpp to master-764-e22272e or a later patched version. This can be done by pulling the latest changes from the repository or applying the security patch manually. Avoid loading untrusted .safetensors files until the update is applied.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-70660. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...