Vulnerabilities

CVE-2026-27940

High 7.8 CVSS 3.1

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.

Description as published by the source, in English.

Key facts

Published
2026-03-12
Last modified
2026-06-17
Assigned by
security-advisories@github.com
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Scored by
security-advisories@github.com
Probability of exploitation
0.2 % higher than 7 % of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15
Fix available
Not registered in the sources

Affected products

Vendor Product Versions Status
Ggml Llama.cpp < b8146 Affected

Weakness type

  • CWE-122: Heap-based Buffer Overflow

    The product writes past the end of a buffer that was allocated on the heap.

  • CWE-190: Integer Overflow or Wraparound

    The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is i…

References

Does this affect you?

A vulnerability matters only if you run the product, in an affected version, somewhere an attacker can reach.

Check your asset list Browse all vulnerabilities