Sceawere

Vulnerability Detail

CVE-2026-43627UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV

llama.cpp Integer Overflow Vulnerability

Vulnerability Metadata

Severity
High
Score / CVSS
7.8
Creation Date
1d ago
Vendor
ggml-org
Product
llama.cpp
Attack Type
Integer Overflow or Wraparound
Vector String
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Attack Complexity
LOW

Narrative and Response

Description

llama.cpp builds b1283 through b9058 contain an integer overflow vulnerability in the llama_batch_init() function where unchecked multiplications in malloc() calls can wrap past INT32_MAX when computing allocation sizes. Attackers can pass specially crafted parameters to trigger integer overflow, causing heap corruption and potentially achieving arbitrary code execution through subsequent batch operations that write past allocated buffer boundaries.

Executive Summary

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Executive Summary Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Technical Details

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Detailed Technical Analysis Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Mitigations

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Remediation & Mitigations Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

References

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Intelligence References Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Additional Metadata

{
  "score": "7.8",
  "pubDate": "2026-08-06T22:17:05.633Z",
  "pubdate": "2026-08-06T22:17:05.633Z",
  "executiveSummary": "An integer overflow vulnerability exists in the llama_batch_init() function within llama.cpp builds b1283 through b9058.\nThe flaw arises due to unchecked multiplications within dynamic memory allocation routines, specifically malloc() calls, which can wrap past INT32_MAX when calculating required buffer sizes.\nSuccessful exploitation of this vulnerability allows an attacker to cause heap corruption by passing specially crafted parameters.\nThis condition can potentially lead to arbitrary code execution through subsequent batch operations that write past allocated buffer boundaries.\nThe vulnerability impacts systems utilizing vulnerable versions of the llama.cpp library.\nRisk implications include loss of integrity and potential system compromise if an attacker successfully triggers the integer overflow via untrusted inputs.\nAttackers require the ability to pass malicious parameters to the batch initialization routine to facilitate exploitation.",
  "technicalDetails": "The root cause of the vulnerability resides in the llama_batch_init() function within the llama.cpp codebase, specifically affecting builds b1283 through b9058.\nDuring the execution of llama_batch_init(), the application computes memory allocation sizes by performing multiplication operations to determine the required buffer dimensions for batch processing.\nThese arithmetic calculations lack proper bounds checking and validation before being passed into standard memory allocation functions such as malloc().\nWhen an attacker supplies specially crafted parameters, the resulting multiplication operation exceeds the maximum integer capacity of INT32_MAX, causing an integer overflow and wrapping around to a smaller numerical value.\nConsequently, the malloc() function allocates a heap buffer that is significantly smaller than what is logically required by the subsequent operations.\nIn the attack flow, once the undersized heap buffer is allocated, subsequent batch operations attempt to write data based on the original, un-wrapped sizing parameters.\nThis mismatch results in a severe heap-based buffer overflow, corrupting adjacent heap metadata and memory structures.\nDepending on the heap layout and subsequent operations, this memory corruption can be leveraged by an adversary to achieve arbitrary code execution within the context of the running process.\nThe vulnerable component is the batch initialization logic within the library.\nExploitation does not inherently require authentication or specific privilege levels if the application exposes the vulnerable batch initialization interface to untrusted input sources or network exposure."
}
CVE-2026-43627: llama.cpp Integer Overflow Vulnerability (HIGH Severity, CVSS: 7.8) - Sceawere