7.8

CVE-2026-27940: llama.cpp has a Heap Buffer Overflow via Integer Overflow in `mem_size` Calculation — Bypass of CVE-2025-53630 Fix

Analyzed
AliasesUBUNTU-CVE-2026-27940DEBIAN-CVE-2026-27940
Published 12-03-2026Last modified 14-03-2026

Vulnerability summary

CVE-2026-27940 is a high (CVSS 7.8) Heap-based Buffer Overflow vulnerability in ggml-org llama.cpp. EPSS estimates a 0.21% chance of exploitation in the next 30 days, higher than 11.7% of scored vulnerabilities. 1 public exploit is recorded.

Priority
Prioritisepublic exploit

Public exploit (GitHub, Date unknown)

Source freshness unavailable

How is this decided?
CVSS score
7.8/10
010
High · v3.1 (CVE.org)
EPSS score
0.21%
0%100%
Low · +0.02 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits1github

Timeline

  1. 12-03-2026
    PublishedVulnerability first disclosed.
  2. 14-03-2026
    Last modifiedVulnerability information updated.

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.

CVSS metrics

4 scores · 4 sources · 1 version

EPSS trend

Probability

0.21%

Chance of exploitation in the next 30 days

Percentile

12%

Versus all other CVEs

30-day change

Increase +0.02 pp

From 0.19% on 21-10-2026

21-10-202620-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • githubUnverified

    Llama.Cpp

    Maturity: poc

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: local access, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.

Debian1 product
  • llama.cpp< 8461+dfsg-1
Ggml1 product
Ggml-org1 product
Ubuntu1 product
  • llama.cppAll versions (No fix recorded)

4 vendors · 4 products

References

4 links