Out-of-bounds Write Affecting leejet/stable-diffusion.cpp package, versions [,master-584-0a7ae07)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.2% (11th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Out-of-bounds Write vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-LEEJETSTABLEDIFFUSIONCPP-17660918
  • published28 Jun 2026
  • disclosed16 Jun 2026
  • creditUnknown

Introduced: 16 Jun 2026

CVE-2026-47749  (opens in a new tab)
CWE-787  (opens in a new tab)

How to fix?

Upgrade leejet/stable-diffusion.cpp to version master-584-0a7ae07 or higher.

Overview

Affected versions of this package are vulnerable to Out-of-bounds Write via the SHORT_BINUNICODE parsing process for PyTorch checkpoint files. An attacker can cause heap corruption or potentially achieve code execution by supplying a crafted .ckpt file containing a malicious opcode length field. This is only exploitable if an application loads a .ckpt file from an untrusted source.

Workaround

This vulnerability can be mitigated by only loading checkpoint files from trusted sources and preferring safer formats such as .safetensors.

CVSS Base Scores

version 4.0
version 3.1