{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "0"
                  },
                  {
                    "fixed": "master-764-e22272e"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              },
              {
                "range": [
                  {
                    "fixed": "e22272ee631b742dab4440c18eb8fcafb0689402"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "original_tag": "master-764-e22272e",
                "range": [
                  {
                    "fixed": "e22272ee631b742dab4440c18eb8fcafb0689402"
                  }
                ],
                "source": "REFERENCES_TAG"
              }
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "e22272ee631b742dab4440c18eb8fcafb0689402"
            }
          ],
          "repo": "https://github.com/leejet/stable-diffusion.cpp",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-v2m4-h57v-fr6w"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-125"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/70xxx/CVE-2026-70660.json"
  },
  "details": "stable-diffusion.cpp is a pure C/C++ library for running diffusion model (Stable Diffusion, Flux, Wan, Qwen Image, Z-Image, and more) inference. Prior to master-764-e22272e, the safetensors loader in src/model_io/safetensors_io.cpp trusts each tensor's data_offsets after checking only that nbytes equals end - begin. A crafted .safetensors file can declare a byte range beyond the file's data section, causing src/model_loader.cpp to consume an attacker-chosen length from an unchecked mapped-file offset. Loading the model can read adjacent process memory into tensor buffers or crash the process. This issue is fixed in master-764-e22272e.",
  "id": "CVE-2026-70660",
  "modified": "2026-11-05T21:15:59.497301216Z",
  "published": "2026-11-05T15:27:53.815Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/70xxx/CVE-2026-70660.json"
    },
    {
      "type": "FIX",
      "url": "https://github.com/leejet/stable-diffusion.cpp/commit/e22272ee631b742dab4440c18eb8fcafb0689402"
    },
    {
      "type": "FIX",
      "url": "https://github.com/leejet/stable-diffusion.cpp/pull/1754"
    },
    {
      "type": "WEB",
      "url": "https://github.com/leejet/stable-diffusion.cpp/releases/tag/master-764-e22272e"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/leejet/stable-diffusion.cpp/security/advisories/GHSA-v2m4-h57v-fr6w"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-70660"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:N/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "stable-diffusion.cpp: Out-of-bounds read in safetensors loader: unvalidated data_offsets allow a tensor's byte range to extend past the end of the file"
}