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

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.

Published: 2026-03-12 Last update: 2026-03-12 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2026-27940 is rated Low Risk (31.9/100): CVSS High severity, with low exploitation likelihood (EPSS 0.01%). Mandatory action: Monitor for updates and reassess as exploit intelligence or EPSS changes.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2026-27940

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-03-13 0.01%

Full EPSS history (1 record total)

Common vulnerability scoring system (CVSS) metrics for CVE-2026-27940

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.8 3.1 HIGH
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.8 5.9 [email protected]

Weakness enumeration for CVE-2026-27940

OS Trackers for CVE-2026-27940

vendor priority summary link
debian not yet assigned CVE-2026-27940 not yet assigned priority: Debian including 1 source packages (llama.cpp), 2 status rows across 2 suites (forky, sid): resolved 2. https://security-tracker.debian.org/tracker/CVE-2026-27940
ubuntu medium CVE-2026-27940 medium priority: Ubuntu including 1 source packages (llama.cpp), 4 status rows across 4 suites (jammy, noble, questing, upstream): DNE 2, needs-triage 2. https://ubuntu.com/security/CVE-2026-27940

Affected software / configurations for CVE-2026-27940

Vendor Product Version Raw CPE
No affected products in dataset.

References for CVE-2026-27940

cvelogic Threat Intelligence