Skip to main content

stable-diffusion.cpp CVE-2026-47748

| EUVDEUVD-2026-37137 MEDIUM
Out-of-bounds Read (CWE-125)
2026-06-16 GitHub_M
5.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious/truncated .ckpt file
  2. Delivery
    Host on model-sharing platform
  3. Exploit
    Victim downloads and loads file
  4. Execution
    Pickle opcode handler advances buffer without bounds check
  5. Persist
    Out-of-bounds read past buffer_end
  6. Impact
    Application crash or adjacent memory disclosure

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the victim application to load a .ckpt format PyTorch checkpoint file originating from an untrusted source - the vulnerability is not triggered by .safetensors, GGUF, or other non-pickle model formats. The CVSS attack vector is local (AV:L), meaning the malicious file must be present on the system and explicitly loaded by the application or user (UI:R); remote network delivery alone is insufficient without this final load step. No privileges are required of the attacker (PR:N per CVSS). Exploitation is therefore limited to deployments where the application accepts .ckpt model files, particularly pipelines that auto-download community models from sharing platforms. Applications that exclusively load .safetensors files or enforce a trusted-source allowlist are not affected, as the vulnerable parser is only invoked for .ckpt inputs.

Impact

The CVSS 3.1 score of 5.5 (Medium) reflects a local attack vector requiring user interaction - an attacker cannot exploit this without the victim first loading a crafted .ckpt file, making automated mass exploitation unlikely. The vector AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H scores availability impact as High (crash) with no confidentiality or integrity impact. However, the source data tags this vulnerability as 'Information Disclosure,' which conflicts with the C:N CVSS score - out-of-bounds reads in C/C++ parsers routinely expose adjacent heap or stack memory, and defenders should treat potential memory leakage as a realistic secondary impact pending vendor clarification. No CISA KEV listing exists and no public exploit has been identified at time of analysis. Critically, LibFuzzer triggered crashes in under one second with malformed inputs, indicating that any threat actor with basic fuzzing capability could rapidly generate working crash payloads without sophisticated exploit development. The practical risk is highest for applications that automatically download and load community-sourced .ckpt model files, where the UI:R user-interaction requirement effectively becomes a design feature of normal operation rather than a true exploitation barrier.

Exploit ScenarioDerived

An attacker publishes a maliciously crafted or deliberately truncated .ckpt model file on a popular model-sharing platform such as Hugging Face or CivitAI. A developer or end-user downloads and loads the file into an application built on an unpatched version of stable-diffusion.cpp, triggering the out-of-bounds read in the pickle opcode parser, which causes an application crash or, depending on runtime memory layout, leaks adjacent heap contents. Because LibFuzzer demonstrated crashing inputs can be generated in under one second, no sophisticated exploit development is required beyond constructing a malformed .ckpt file.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 16, 2026

Out-of-bounds reads in stable-diffusion.cpp's PyTorch pickle checkpoint parser (versions prior to master-584-0a7ae07) allow a crafted or truncated .ckpt file to crash the loading application or leak process memory contents. The pickle opcode handlers in src/model.cpp advanced the buffer pointer without verifying remaining bytes before each read, meaning any application using this library to load untrusted .ckpt model files is exposed to denial-of-service and potential memory disclosure. No public exploit has been identified at time of analysis, though LibFuzzer triggered crashing inputs in under one second, indicating an extremely low barrier for generating working crash payloads.

RemediationAI

Upstream fix available (commit 0a7ae07f948eff4611968a65a22bd7c7031ad74f); a formally tagged released version is not independently confirmed beyond the master-584-0a7ae07 identifier. Developers should update to or rebuild from commit 0a7ae07 or any subsequent commit, available at https://github.com/leejet/stable-diffusion.cpp/commit/0a7ae07f948eff4611968a65a22bd7c7031ad74f. If an immediate update is not feasible, the vendor-recommended workaround is to restrict model loading exclusively to verified trusted sources and prefer the .safetensors format, which does not invoke the vulnerable pickle-based parser. Applications should implement an allowlist of permitted model file origins and refuse to process .ckpt files from arbitrary user-supplied URLs or unvetted community repositories. Note that switching to .safetensors eliminates the pickle attack surface entirely but may require model conversion for existing .ckpt weights, and not all community models have .safetensors equivalents available.

Affected VersionsENISA

stable-diffusion.cpp < master-584-0a7ae07

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerable component is the PyTorch checkpoint (.ckpt) pickle parser in src/model.cpp of leejet/stable-diffusion.cpp (CPE: cpe:2.3:a:leejet:stable-diffusion.cpp:*:*:*:*:*:*:*:*), a pure C/C++ library for running Stable Diffusion, Flux, Wan, and related diffusion model inference. CWE-125 (Out-of-bounds Read) is the root cause: throughout the pickle parser, opcode handlers advanced the parser position using expressions such as 'buffer += N' without first verifying that 'buffer + N <= buffer_end'. A specially crafted or simply truncated .ckpt file can therefore drive reads past the end of the metadata buffer into adjacent memory. The fix (commit 0a7ae07) restructures checkpoint I/O by replacing the vulnerable ckpt_io.h parser entirely with separate torch_legacy_io and torch_zip_io modules that enforce proper bounds on every buffer advance, and renames the dispatching logic in model.cpp accordingly.

Know when Checkpoint gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 5.5 MEDIUM
AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
vuln.today AI 6.1 MEDIUM

Upgraded C from N to L because CWE-125 OOB reads in C/C++ can expose adjacent memory, conflicting with the 'Information Disclosure' tag; all other metrics align with the official vector.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:A/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

DescriptionCVE.org

stable-diffusion.cpp is a pure C/C++ library for running diffusion model (Stable Diffusion, Flux, Wan, Qwen Image, Z-Image, and more) inference. Versions prior to master-584-0a7ae07 are vulnerable to an out-of-bounds reads error through PyTorch checkpoint pickle opcode parsing. The pickle .ckpt parser in src/model.cpp did not consistently check that enough input remained before reading opcode arguments or advancing the parser buffer with a crafted or truncated .ckpt file. Throughout the pickle parser, opcode handlers advanced the parser position with expressions such as buffer += N without first checking that buffer + N <= buffer_end. A truncated file could therefore cause reads past the end of the metadata buffer. LibFuzzer found crashes in under one second using malformed checkpoint inputs. Any application using affected stable-diffusion.cpp releases to load untrusted .ckpt model files could be vulnerable. The attack requires the victim or application to load a .ckpt file from an untrusted source, such as a downloaded model from a model sharing site. This issue has been fixed in version master-584-0a7ae07. If developers are unable to immediately update their applications, they can work around this issue by ensuring they do not load .ckpt checkpoint files from untrusted sources. They should prefer trusted model sources and safer formats such as .safetensors where possible.

Threat Intelligence Overview

EPSS Score
0.1%
Top 98% exploitable
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

28
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +28
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2014-6271 CRITICAL POC
9.8 Sep 24

GNU Bash through 4.3 processes trailing strings after function definitions in the values of environment variables, which

CVE-2024-24919 HIGH POC
8.6 May 28

Potentially allowing an attacker to read certain information on Check Point Security Gateways once connected to the inte

CVE-2014-7169 CRITICAL POC
9.8 Sep 25

GNU Bash through 4.3 bash43-025 processes trailing strings after certain malformed function definitions in the values of

CVE-2017-1000083 HIGH POC
7.8 Sep 05

backend/comics/comics-document.c (aka the comic book backend) in GNOME Evince before 3.24.1 allows remote attackers to e

CVE-2026-85102 CRITICAL POC
9.8 Sep 09

Remote code execution in Check Point Quantum Security Gateway arises from improper certificate trust validation during V

CVE-2026-16232 CRITICAL POC
9.3 Jul 22

Authentication bypass in the Check Point SmartConsole login process lets an unauthenticated remote attacker mint a valid

CVE-2026-50751 CRITICAL POC
9.3 Jun 08

Authentication bypass in Check Point Quantum Security Gateway and Spark Firewalls allows unauthenticated remote attacker

CVE-2026-93616 CRITICAL POC
9.8 Sep 22

Unauthenticated attackers who can reach the file-upload interface of Check Point Management Server can combine directory

CVE-2021-3449 MEDIUM
5.9 Mar 25

An OpenSSL TLS server may crash if sent a maliciously crafted renegotiation ClientHello message from a client. Rated med

CVE-2026-85103 CRITICAL POC
9.8 Sep 09

Remote code execution in Check Point Quantum Security Gateway and Quantum Security Management stems from a heap-based bu

CVE-2026-91843 CRITICAL POC
9.8 Sep 16

Unauthenticated remote code execution affects Check Point Quantum Security Management, where a stack-based buffer overfl

CVE-2024-3568 CRITICAL POC
9.6 Apr 10

The huggingface/transformers library is vulnerable to arbitrary code execution through deserialization of untrusted data

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy