SA-26-476 High

llama.cpp: Llama.cpp builds b4882 through b9058 contain a heap buffer overflow vulnerability in the KV…

llama.cpp

Severity
High, CVSS 8.1
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Record
CVE-2026-43629
Affects
llama.cpp
Known exploited
Not listed in the CISA Known Exploited Vulnerabilities catalog
Published
Record first published by the source
August 6, 2026
Source last modified
October 23, 2026

Description

llama.cpp builds b4882 through b9058 contain a heap buffer overflow vulnerability in the KV cache state restore path where the state_read_data() function computes write size without overflow checking, allowing attackers with write access to the slot_save_path directory to corrupt heap memory. Attackers can craft malicious state files where cell_count multiplication overflows or exceeds tensor buffer allocation to write attacker-controlled bytes past buffer boundaries, potentially resulting in heap metadata corruption, model weight corruption, or arbitrary code execution via function pointer overwrite.

Description quoted from the NVD record.

Who is affected

llama.cpp, made by ggml, is a program that runs AI language models on your own computers or servers. This flaw affects builds b4882 through b9058. The problem is in the feature that saves a conversation's working memory to a file and loads it back later. An attacker who can put files into the folder where these saved files are kept could plant a specially crafted file that damages the program's memory when it is loaded. This could corrupt the AI model's data or let the attacker run their own code on the machine. This flaw is rated High.

What to do

  1. Find out whether anyone in your organization uses llama.cpp, and who installed it or runs it: a staff member, a volunteer, or an IT provider.
  2. If someone in your organization runs it, ask them to check which build is installed. Builds b4882 through b9058 have this flaw.
  3. No fixed version is named for this flaw yet, so the person who runs llama.cpp should check the vendor advisory linked on this page for a fixed release and install it as soon as it is available.
  4. If an IT provider or vendor runs llama.cpp for your organization, send them this advisory and ask when the update will be done.

Analysis written from the source record as of October 23, 2026 and reviewed before publishing.

Sources

MORE ADVISORIES

See all