CVE-2026-47749
Full vulnerability record from the local CVENow database.
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. Versions prior to master-584-0a7ae07 are vulnerable to heap buffer overflow in SHORT_BINUNICODE parsing for PyTorch checkpoint files. The pickle .ckpt parser in src/model.cpp contained a heap buffer overflow vulnerability in the SHORT_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. Any application using affected stable-diffusion.cpp releases to load untrusted .ckpt model files could be vulnerable. A malicious checkpoint file could cause heap corruption through memcpy with an attacker-controlled length. This may lead to process crash and could potentially be leveraged for code execution depending on heap layout. 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. The 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 not loading .ckpt checkpoint files from untrusted sources, and referring to trusted model sources and safer formats such as .safetensors where possible.
View original CVE JSON
{
"id": "CVE-2026-47749",
"sourceIdentifier": "[email protected]",
"published": "2026-06-16T19:16:55.867",
"lastModified": "2026-10-25T23:10:00.167",
"vulnStatus": "Analyzed",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "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 heap buffer overflow in SHORT_BINUNICODE parsing for PyTorch checkpoint files. The pickle .ckpt parser in src/model.cpp contained a heap buffer overflow vulnerability in the SHORT_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. Any application using affected stable-diffusion.cpp releases to load untrusted .ckpt model files could be vulnerable. A malicious checkpoint file could cause heap corruption through memcpy with an attacker-controlled length. This may lead to process crash and could potentially be leveraged for code execution depending on heap layout. 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. The 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 not loading .ckpt checkpoint files from untrusted sources, and referring to trusted model sources and safer formats such as .safetensors where possible."
},
{
"lang": "es",
"value": "stable-diffusion.cpp es una biblioteca pura de C/C++ para ejecutar inferencia de modelos de difusión (Stable Diffusion, Flux, Wan, Qwen Image, Z-Image y más). Las versiones anteriores a master-584-0a7ae07 son vulnerables a un desbordamiento de búfer de montón en el análisis de SHORT_BINUNICODE para archivos de punto de control de PyTorch. El analizador pickle .ckpt en src/model.cpp contenía una vulnerabilidad de desbordamiento de búfer de montón en el gestor del código de operación SHORT_BINUNICODE. El problema fue causado por una confusión de signo en el campo de longitud del código de operación. Un archivo .ckpt manipulado podría activar memcpy con una longitud muy grande derivada de un valor con signo negativo, causando una corrupción inmediata del montón. Cualquier aplicación que utilice versiones afectadas de stable-diffusion.cpp para cargar archivos de modelo .ckpt no confiables podría ser vulnerable. Un archivo de punto de control malicioso podría causar corrupción del montón a través de memcpy con una longitud controlada por el atacante. Esto podría llevar a la caída del proceso y potencialmente ser aprovechado para la ejecución de código dependiendo del diseño del montón. El ataque requiere que la víctima o la aplicación cargue un archivo .ckpt de una fuente no confiable, como un modelo descargado de un sitio de intercambio de modelos. El problema ha sido resuelto en la versión master-584-0a7ae07. Si los desarrolladores no pueden actualizar sus aplicaciones de inmediato, pueden solucionar este problema al no cargar archivos de punto de control .ckpt de fuentes no confiables, y refiriéndose a fuentes de modelos confiables y formatos más seguros como .safetensors cuando sea posible."
}
],
"affected": [
{
"source": "[email protected]",
"affectedData": [
{
"vendor": "leejet",
"product": "stable-diffusion.cpp",
"versions": [
{
"version": "< master-584-0a7ae07",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "[email protected]",
"type": "Secondary",
"cvssData": {
"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",
"attackVector": "LOCAL",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "REQUIRED",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"availabilityImpact": "HIGH"
},
"exploitabilityScore": 1.8,
"impactScore": 5.9
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-06-16T19:31:17.346999Z",
"id": "CVE-2026-47749",
"options": [
{
"exploitation": "poc"
},
{
"automatable": "no"
},
{
"technicalImpact": "total"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "[email protected]",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-122"
},
{
"lang": "en",
"value": "CWE-787"
}
]
}
],
"configurations": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:a:leejet:stable-diffusion.cpp:*:*:*:*:*:c\\+\\+:*:*",
"versionEndExcluding": "master-584-0a7ae07",
"matchCriteriaId": "EF9A4C1B-8396-48E6-8E46-3A3767DA17FC"
}
]
}
]
}
],
"references": [
{
"url": "https://github.com/leejet/stable-diffusion.cpp/commit/0a7ae07f948eff4611968a65a22bd7c7031ad74f",
"source": "[email protected]",
"tags": [
"Patch"
]
},
{
"url": "https://github.com/leejet/stable-diffusion.cpp/pull/1443",
"source": "[email protected]",
"tags": [
"Issue Tracking",
"Patch"
]
},
{
"url": "https://github.com/leejet/stable-diffusion.cpp/security/advisories/GHSA-2c29-5hxg-fv9g",
"source": "[email protected]",
"tags": [
"Exploit",
"Mitigation",
"Vendor Advisory"
]
},
{
"url": "https://github.com/leejet/stable-diffusion.cpp/security/advisories/GHSA-2c29-5hxg-fv9g",
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"tags": [
"Exploit",
"Mitigation",
"Vendor Advisory"
]
}
]
}