SecurityContext

CVE-2026-43629: llama.cpp - Buffer Overflow

  • Cve: CVE-2026-43629
  • Name: llama.cpp - Buffer Overflow
  • 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.
  • Impact: Attackers with write access can corrupt heap memory, potentially leading to arbitrary code execution and model weight corruption.
  • Remediation: Update to a version later than build b9058 or the latest available version.
  • Vulnerability type: buffer_overflow
  • Vulnerability impact: remote_code_execution, data_tampering
  • Requirements: Attacker needs write access to slot_save_path directory
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 8.1
  • Cvss vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Epss score: 0.00698
  • Epss percentile: 0.54046
  • Assignee: [email protected]
  • Published at: 2026-08-06T22:17:05Z
  • Age in days: 110
  • Modified at: 2026-10-29T21:17:23Z
  • Patch available: yes
  • References total: 2
  • Products total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-43629
  • Nvd status: analyzed
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, oss, projects total, projects, rejected by nvd
  • Not known: requirement type, hackerone

Cwe

IdName
CWE-190Integer Overflow or Wraparound

References

UrlSourceTags
https://github.com/Vladimir-tokarev-cyera/llama-cpp-security-patchesnvdPatch, Third Party Advisory
https://www.vulncheck.com/advisories/llama-cpp-b4882-b9058-buffer-overflow-in-kv-cache-state-restorenvdMitigation, Patch, Third Party Advisory

Products

ProductAffectedPlatform boundSourcesUrl
ggml:llama.cpp>= b4882, <= b9058nonvd/v1/products/ggml/llama.cpp

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Remote: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts