CVE-2026-47750: CWE-787: Out-of-bounds Write in leejet stable-diffusion.cpp
A heap buffer overflow vulnerability exists in the pickle .ckpt parser of stable-diffusion.cpp prior to version master-584-0a7ae07. The flaw occurs due to missing validation when parsing newline-delimited fields, allowing a crafted .ckpt file without the expected newline to cause heap corruption. This vulnerability requires loading a malicious .ckpt file from an untrusted source. The issue has been fixed in version master-584-0a7ae07. Until updated, users should avoid loading .ckpt files from untrusted sources and prefer safer formats like .safetensors.
AI Analysis
Technical Summary
The stable-diffusion.cpp library's pickle .ckpt parser in src/model.cpp contains a heap buffer overflow vulnerability in the GLOBAL opcode handler caused by missing validation of newline-delimited fields. Specifically, a crafted .ckpt file lacking the expected newline causes the parser to use -1 as a copy length, leading to immediate heap corruption. Exploitation requires the victim to load a malicious .ckpt checkpoint file from an untrusted source. The vulnerability is resolved in version master-584-0a7ae07. Developers unable to upgrade immediately are advised to avoid untrusted .ckpt files and prefer trusted sources or safer file formats such as .safetensors.
Potential Impact
Successful exploitation can lead to heap corruption, resulting in potential arbitrary code execution, data corruption, or application crashes. The vulnerability affects confidentiality, integrity, and availability of the affected application. However, exploitation requires user interaction to load a malicious .ckpt file from an untrusted source.
Mitigation Recommendations
A fix is available in stable-diffusion.cpp version master-584-0a7ae07. Users and developers should upgrade to this version to remediate the vulnerability. If immediate upgrade is not possible, do not load .ckpt checkpoint files from untrusted sources. Prefer trusted model sources and safer formats such as .safetensors to avoid exposure to this vulnerability.
CVE-2026-47750: CWE-787: Out-of-bounds Write in leejet stable-diffusion.cpp
Description
A heap buffer overflow vulnerability exists in the pickle .ckpt parser of stable-diffusion.cpp prior to version master-584-0a7ae07. The flaw occurs due to missing validation when parsing newline-delimited fields, allowing a crafted .ckpt file without the expected newline to cause heap corruption. This vulnerability requires loading a malicious .ckpt file from an untrusted source. The issue has been fixed in version master-584-0a7ae07. Until updated, users should avoid loading .ckpt files from untrusted sources and prefer safer formats like .safetensors.
CVSS v3.1
Score 7.8high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The stable-diffusion.cpp library's pickle .ckpt parser in src/model.cpp contains a heap buffer overflow vulnerability in the GLOBAL opcode handler caused by missing validation of newline-delimited fields. Specifically, a crafted .ckpt file lacking the expected newline causes the parser to use -1 as a copy length, leading to immediate heap corruption. Exploitation requires the victim to load a malicious .ckpt checkpoint file from an untrusted source. The vulnerability is resolved in version master-584-0a7ae07. Developers unable to upgrade immediately are advised to avoid untrusted .ckpt files and prefer trusted sources or safer file formats such as .safetensors.
Potential Impact
Successful exploitation can lead to heap corruption, resulting in potential arbitrary code execution, data corruption, or application crashes. The vulnerability affects confidentiality, integrity, and availability of the affected application. However, exploitation requires user interaction to load a malicious .ckpt file from an untrusted source.
Mitigation Recommendations
A fix is available in stable-diffusion.cpp version master-584-0a7ae07. Users and developers should upgrade to this version to remediate the vulnerability. If immediate upgrade is not possible, do not load .ckpt checkpoint files from untrusted sources. Prefer trusted model sources and safer formats such as .safetensors to avoid exposure to this vulnerability.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-19T22:16:39.504Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a31a4690b89be68881528e8
Added to database: 06/16/2026, 19:30:49 UTC
Last enriched: 06/24/2026, 16:42:22 UTC
Last updated: 07/31/2026, 19:22:59 UTC
Views: 207
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.