{
  "id": "CVE-2026-27940",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-27940",
  "published_at": "2026-03-12T16:39:37.463Z",
  "title": "llama.cpp has a Heap Buffer Overflow via Integer Overflow in `mem_size` Calculation — Bypass of CVE-2025-53630 Fix",
  "vendor": "ggml-org",
  "product": "llama.cpp",
  "cvss": {
    "score": 7.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/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": {
    "created_at": "2026-03-29T13:30:04Z",
    "first_seen_at": "2026-11-14T11:25:11.578Z",
    "days_after_publication": 16.9,
    "repo": "ngtuonghung/CVE-2026-27940",
    "source": "github"
  },
  "poc_repo_count": 1,
  "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 b8146, the gguf_init_from_file_impl() in gguf.cpp is vulnerable to an Integer overflow, leading to an undersized heap allocation. Using the subsequent fread() writes 528+ bytes of attacker-controlled data past the buffer boundary. This is a bypass of a similar bug in the same file - CVE-2025-53630, but the fix overlooked some areas. This vulnerability is fixed in b8146.",
  "cwe": "CWE-122",
  "cpes": [
    "cpe:2.3:a:ggml:llama.cpp:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8
  },
  "repos": [
    {
      "repo": "ngtuonghung/CVE-2026-27940",
      "url": "https://github.com/ngtuonghung/CVE-2026-27940",
      "created_at": "2026-03-29T13:30:04Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 1,
      "is_poc": "yes",
      "kind": "listed by PoC Index",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2023-08-05T14:21:04Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "ggml-org",
        "product": "llama.cpp",
        "ranges": [
          "\u003c b8146"
        ],
        "fixed_in": null
      }
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/ggml-org/llama.cpp/security/advisories/GHSA-3p4r-fq3f-q74v"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
