{"document":{"category":"csaf_vex","csaf_version":"2.0","title":"CVE-2026-47747: stable-diffusion.cpp has a  Heap-based Buffer Overflow","publisher":{"category":"vendor","name":"HarborGuard Database","namespace":"https://database.harborguard.co"},"tracking":{"id":"CVE-2026-47747","status":"final","version":"1","initial_release_date":"2026-06-16T18:32:33.377Z","current_release_date":"2026-06-16T18:32:33.377Z","revision_history":[{"date":"2026-06-16T18:32:33.377Z","number":"1","summary":"Initial machine-readable export from HarborGuard."}]},"distribution":{"tlp":{"label":"WHITE"},"text":"Public CVE data; freely redistributable."},"notes":[{"category":"description","text":"stable-diffusion.cpp is a pure C/C++ library for running diffusion model (Stable Diffusion, Flux, Wan, Qwen Image, Z-Image, and more) inference. In versions prior to master-584-0a7ae07, the pickle .ckpt parser in src/model.cpp contained a heap buffer overflow vulnerability in the BINUNICODE opcode handler. The issue was caused by sign confusion on the opcode length field. A crafted .ckpt file could trigger memcpy with a very large length derived from a negative signed value, causing immediate heap corruption.\nThe issue has been resolved in version master-584-0a7ae07. If developers are unable to immediately update their applications they can work around this issue by only loading .ckpt checkpoint files from trusted sources and preferring trusted model sources and safer formats such as .safetensors where possible.","title":"CVE description"}],"references":[{"category":"self","summary":"CVE-2026-47747 on HarborGuard Database","url":"https://database.harborguard.co/cve/CVE-2026-47747"},{"category":"external","summary":"CVE Record","url":"https://www.cve.org/CVERecord?id=CVE-2026-47747"},{"category":"external","summary":"https://github.com/leejet/stable-diffusion.cpp/security/advisories/GHSA-mghm-5mqc-pwmp","url":"https://github.com/leejet/stable-diffusion.cpp/security/advisories/GHSA-mghm-5mqc-pwmp"},{"category":"external","summary":"https://github.com/leejet/stable-diffusion.cpp/pull/1443","url":"https://github.com/leejet/stable-diffusion.cpp/pull/1443"},{"category":"external","summary":"https://github.com/leejet/stable-diffusion.cpp/commit/0a7ae07f948eff4611968a65a22bd7c7031ad74f","url":"https://github.com/leejet/stable-diffusion.cpp/commit/0a7ae07f948eff4611968a65a22bd7c7031ad74f"}]},"product_tree":{"branches":[{"category":"vendor","name":"leejet","branches":[{"category":"product_name","name":"stable-diffusion.cpp","branches":[{"category":"product_version","name":"< master-584-0a7ae07","product":{"name":"leejet stable-diffusion.cpp < master-584-0a7ae07","product_id":"CSAFPID-1","product_identification_helper":{"cpe":"cpe:2.3:a:leejet:stable-diffusion.cpp:\\<_master-584-0a7ae07:*:*:*:*:*:*:*"}}}]}]}]},"vulnerabilities":[{"cve":"CVE-2026-47747","title":"stable-diffusion.cpp has a  Heap-based Buffer Overflow","notes":[{"category":"description","text":"stable-diffusion.cpp is a pure C/C++ library for running diffusion model (Stable Diffusion, Flux, Wan, Qwen Image, Z-Image, and more) inference. In versions prior to master-584-0a7ae07, the pickle .ckpt parser in src/model.cpp contained a heap buffer overflow vulnerability in the BINUNICODE opcode handler. The issue was caused by sign confusion on the opcode length field. A crafted .ckpt file could trigger memcpy with a very large length derived from a negative signed value, causing immediate heap corruption.\nThe issue has been resolved in version master-584-0a7ae07. If developers are unable to immediately update their applications they can work around this issue by only loading .ckpt checkpoint files from trusted sources and preferring trusted model sources and safer formats such as .safetensors where possible.","title":"CVE description"}],"product_status":{"known_affected":["CSAFPID-1"]},"scores":[{"cvss_v3":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"products":["CSAFPID-1"]}],"remediations":[{"category":"none_available","details":"No fixed version is published yet. Monitor the upstream advisory.","product_ids":["CSAFPID-1"]}]}]}