Skip to main content
VulnerabilityPublished Updated

CVE-2026-27940: ggml-org llama.cpp · Heap-based Buffer Overflow

Affects ggml-org llama.cppSource CVE Database V5

0
Compare

Mentioned vulnerabilities

Not known to be exploited · CVSS 7.8 High : upgrade to b8146 soon.

Data as of 30 Oct 2026, 11:52 UTC

CVSS 3.1 base score
7.8High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.1% chance of exploitation in 30 days – higher than 8% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in b8146
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 12 Mar 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: evidence found.

    Public exploit code: GitHub proofs of concept

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), GitHub proofs of concept, the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.

What to do

Upgrade ggml-org llama.cpp to b8146.

Affected software

ProductAffectedFixed in
ggml-orgllama.cppAffected
  • <b8146
Fixed in
  • b8146

AI-suggested

To mitigate CVE-2026-27940, organizations should immediately update llama.cpp to version b8146 or later, where the vulnerability is fully patched. Users should audit their deployment pipelines to ensure no legacy versions remain in use. Implement strict local access controls to limit who can execute or interact with llama.cpp binaries, reducing the risk of exploitation via user interaction. Employ application whitelisting and endpoint protection to detect anomalous behavior indicative of exploitation attempts. Conduct thorough code reviews and fuzz testing on components handling untrusted input to identify similar integer overflow and buffer overflow issues proactively. Additionally, sandbox llama.cpp execution environments to contain potential compromises and monitor logs for unusual fread() or memory allocation errors. Educate users about the risks of opening untrusted files or inputs that could trigger the vulnerability. Finally, maintain an up-to-date inventory of AI inference tools and their versions to facilitate rapid response to future vulnerabilities.

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.

References

Community reviews

Loading reviews…