← Back to CVE Explorer

CVE-2026-47748

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 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.

Severity
MEDIUM
CVSS score
5.5 (v3.1)
Vulnerability status
Analyzed
Source identifier
Published
2026-06-16 19:16:55.720000
Last modified
2026-10-25 23:10:00.167000
View original CVE JSON
{
  "id": "CVE-2026-47748",
  "sourceIdentifier": "[email protected]",
  "published": "2026-06-16T19:16:55.720",
  "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 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."
    },
    {
      "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 error de lectura fuera de límites a través del análisis de códigos de operación pickle de puntos de control de PyTorch. El analizador pickle .ckpt en src/model.cpp no verificaba consistentemente que quedara suficiente entrada antes de leer los argumentos del código de operación o de avanzar el búfer del analizador con un archivo .ckpt manipulado o truncado. A lo largo del analizador pickle, los manejadores de códigos de operación avanzaban la posición del analizador con expresiones como buffer += N sin verificar primero que buffer + N <= buffer_end. Un archivo truncado podría, por lo tanto, causar lecturas más allá del final del búfer de metadatos. LibFuzzer encontró fallos en menos de un segundo utilizando entradas de puntos de control malformadas. Cualquier aplicación que utilice versiones afectadas de stable-diffusion.cpp para cargar archivos de modelo .ckpt no confiables podría ser vulnerable. 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. Este problema ha sido solucionado en la versión master-584-0a7ae07. Si los desarrolladores no pueden actualizar inmediatamente sus aplicaciones, pueden solucionar este problema asegurándose de no cargar archivos de punto de control .ckpt de fuentes no confiables. Deben preferir 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:N/I:N/A:H",
          "baseScore": 5.5,
          "baseSeverity": "MEDIUM",
          "attackVector": "LOCAL",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "REQUIRED",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "NONE",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 1.8,
        "impactScore": 3.6
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-06-16T18:41:44.220881Z",
          "id": "CVE-2026-47748",
          "options": [
            {
              "exploitation": "poc"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-125"
        }
      ]
    }
  ],
  "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/security/advisories/GHSA-rx4w-x86j-vx57",
      "source": "[email protected]",
      "tags": [
        "Exploit",
        "Mitigation",
        "Vendor Advisory"
      ]
    },
    {
      "url": "https://github.com/leejet/stable-diffusion.cpp/security/advisories/GHSA-rx4w-x86j-vx57",
      "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
      "tags": [
        "Exploit",
        "Mitigation",
        "Vendor Advisory"
      ]
    }
  ]
}