LiveActive security incident?Get immediate response
CVE Record

CVE-2026-43629: llama.cpp b4882–b9058 Buffer Overflow in KV Cache State Restore

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.

CriticalCVSS 9.2Not KEV-listedUpdated
Glexia's TakeAutomated analysiscritical

Security readout for executives and security teams

Plain-English summary

A flaw in llama.cpp’s saved-state restoration can corrupt memory when a malicious state file is loaded. Exploitation requires an attacker to influence files in the configured slot-save directory. Successful abuse could crash the service, corrupt model data, or potentially execute code with the service’s privileges.

Executive priority

Treat affected, state-restoring deployments as an urgent remediation priority, especially when untrusted workloads can influence saved files. Immediately restrict directory access and identify exposed instances. Because the supplied material does not name an authoritative fixed release, require engineering to validate the referenced patches and monitor official ggml-org guidance before closing the issue.

Technical view

The state_read_data() path reportedly calculates a KV-cache write size without safely handling multiplication overflow or allocation bounds. A crafted cell count can make the write exceed the destination tensor buffer, causing a heap out-of-bounds write. Reported consequences include heap metadata or model-weight corruption and potential control-flow compromise.

Likely exposure

Exposure is highest where affected llama.cpp builds restore KV-cache states and untrusted users, workloads, or compromised processes can write to slot_save_path. Systems without state restoration or with a directory writable only by a tightly controlled service identity have a reduced attack surface. The supplied sources do not establish how commonly this configuration is deployed.

Exploitation context

The supplied record is not marked as CISA KEV, and the source bundle provides no evidence of active exploitation. Exploitation has an important precondition: attacker influence over saved-state files. Network reachability alone does not prove exploitability; assess whether application workflows permit remote users to create or replace those files.

Researcher notes

The stated affected scope is not fully consistent: the title says builds b4882 through b9058, while the affected entry lists b4882 and 0.16.1. Confirm exact build provenance rather than relying only on semantic versions. Validate integer-overflow checks and destination-buffer bounds in the restore path without testing against production systems.

Mitigation direction

  • Restrict slot_save_path writes to the minimum trusted service identity.
  • Disable KV-cache state restoration where it is not operationally required.
  • Review and apply the referenced security patches after confirming build compatibility.
  • Run llama.cpp with least privilege and isolate it from sensitive files and services.
  • Check ggml-org guidance for an authoritative fixed version or additional mitigation.

Validation and detection

  • Inventory llama.cpp build identifiers in applications, containers, and bundled binaries.
  • Determine whether KV-cache state saving and restoration are enabled.
  • Review slot_save_path ownership, permissions, mounts, and all file-producing workflows.
  • Identify whether remote or untrusted workloads can create or replace restored state files.
  • Confirm the deployed build contains the applicable bounds and integer-overflow protections.
Prepared
Confidence
medium
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-190: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cwe · low confidence lookup

CWE-787: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Execution behavior lookup

The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-43629 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Critical
CVSS
9.2 (4.0)
Known Exploited
No
Published

Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

2CVSS vectors
3Timeline events
1ADP providers
3Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total

CVSS vector scores

2 official scores

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
9.2CVSS 4.0CriticalCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NVulnCheck
8.1CVSS 3.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H2.25.9VulnCheck

Vulnerability scoring details

Base CVSS 4.0 score

9.2Critical
CVSS 4.0 vector shape for CVE-2026-43629Attack VectorAttack ComplexityAttack RequirementsPrivileges RequiredUser InteractionVS ConfidentialityVS IntegrityVS AvailabilitySS ConfidentialitySS IntegritySS Availability

Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Attack Requirements
NonePresent
Privileges Required
NoneLowHigh
User Interaction
NonePassiveActive
VS Confidentiality
HighLowNone
VS Integrity
HighLowNone
VS Availability
HighLowNone
SS Confidentiality
HighLowNone
SS Integrity
HighLowNone
SS Availability
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
other:ssvc
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
ggml-orgllama.cppb4882, 0.16.1affected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-190 · source CWE mapping

Integer Overflow or Wraparound

Integer Overflow or Wraparound represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.

CWE-787 · source CWE mapping

Out-of-bounds Write

Out-of-bounds Write represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.