{
  "id": "CVE-2025-52566",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-52566",
  "published_at": "2025-06-24T03:21:19.009Z",
  "title": "llama.cpp tokenizer signed vs. unsigned heap overflow",
  "vendor": "ggml-org",
  "product": "llama.cpp",
  "cvss": {
    "score": 8.8,
    "source": "nvd",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "llama.cpp is an inference of several LLM models in C/C++. Prior to version b5721, there is a signed vs. unsigned integer overflow in llama.cpp's tokenizer implementation (llama_vocab::tokenize) (src/llama-vocab.cpp:3036) resulting in unintended behavior in tokens copying size comparison. Allowing heap-overflowing llama.cpp inferencing engine with carefully manipulated text input during tokenization process. This issue has been patched in version b5721.",
  "cwe": "CWE-119",
  "cpes": [
    "cpe:2.3:a:ggml:llama.cpp:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 8.6,
    "nvd": 8.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "ggml-org",
        "product": "llama.cpp",
        "ranges": [
          "\u003c b5721"
        ],
        "fixed_in": null
      }
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/ggml-org/llama.cpp/security/advisories/GHSA-7rxv-5jhh-j6xx"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/ggml-org/llama.cpp/commit/dd6e6d0b6a4bbe3ebfc931d1eb14db2f2b1d70af"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
