CVE-2026-43627: Integer Overflow or Wraparound in ggml-org llama.cpp
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.
AI Analysis
Technical Summary
CVE-2026-43627 is an integer overflow vulnerability in the llama_batch_init() function of ggml-org's llama.cpp, specifically in builds b1283 through b9058. The vulnerability occurs because the function performs unchecked multiplications when calculating memory allocation sizes with malloc(), which can wrap around past the INT32_MAX limit. Attackers can exploit this by providing specially crafted parameters that trigger the overflow, causing heap corruption. This corruption may enable arbitrary code execution during later batch operations that write outside the allocated buffer boundaries.
Potential Impact
Successful exploitation of this vulnerability can cause heap corruption and potentially allow an attacker to execute arbitrary code. This could compromise the security of systems running affected versions of llama.cpp, leading to unauthorized control or data manipulation.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch links are currently available. Users should monitor ggml-org's official channels for updates and avoid using affected versions if possible until a fix is released.
CVE-2026-43627: Integer Overflow or Wraparound in ggml-org llama.cpp
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.
CVSS v4.0
Score 8.5high
Affected software
ggml-org
llama.cpp
pkg:github/ggml-org/llama.cppRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-43627 is an integer overflow vulnerability in the llama_batch_init() function of ggml-org's llama.cpp, specifically in builds b1283 through b9058. The vulnerability occurs because the function performs unchecked multiplications when calculating memory allocation sizes with malloc(), which can wrap around past the INT32_MAX limit. Attackers can exploit this by providing specially crafted parameters that trigger the overflow, causing heap corruption. This corruption may enable arbitrary code execution during later batch operations that write outside the allocated buffer boundaries.
Potential Impact
Successful exploitation of this vulnerability can cause heap corruption and potentially allow an attacker to execute arbitrary code. This could compromise the security of systems running affected versions of llama.cpp, leading to unauthorized control or data manipulation.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch links are currently available. Users should monitor ggml-org's official channels for updates and avoid using affected versions if possible until a fix is released.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-05-01T18:22:45.641Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a750702bf8831d5395f59bc
Added to database: 08/06/2026, 22:13:22 UTC
Last enriched: 08/14/2026, 15:52:34 UTC
Last updated: 09/21/2026, 22:01:34 UTC
Views: 40
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.