ZDI-26-1071: llama.cpp GGUF File Parsing Integer Overflow Remote Code Execution Vulnerability
Summary
An Integer Overflow Remote Code Execution (RCE) vulnerability has been identified in the GGUF file parsing component of llama.cpp. Tracked as CVE-2026-131828 with a CVSS score of 7.8, this flaw allows remote attackers to execute arbitrary code on affected installations when a user opens a malicious file or visits a malicious web page.
Affected Products
- llama.cpp
Technical Details
The specific flaw exists within the parsing logic for GGUF files in llama.cpp. The issue stems from the lack of proper validation of user-supplied data, resulting in an integer overflow prior to allocating a memory buffer. An attacker can leverage this vulnerability to execute code within the context of the current process. User interaction is required for exploitation, as the victim must open a crafted malicious file or visit a malicious site.
Impact
Successful exploitation enables attackers to execute arbitrary code in the context of the running llama.cpp process, potentially compromising the target application.
- Confidentiality: High — Attacker can access sensitive memory content and data processed by the application.
- Integrity: High — Attacker can alter execution flow and modify application memory data.
- Availability: High — Integer overflow or arbitrary execution can trigger application crashes and denial-of-service.
Mitigation & Remediation Recommendations
- Update llama.cpp to the latest version containing the fix for this issue (documented in Pull Request #31336).
- Restrict and verify the origin of GGUF model files before opening or processing them.
- Run the application under the principle of least privilege to minimize potential compromise.
References
- Advisory Source Link (ZDI-26-1071) — http://www.zerodayinitiative.com/advisories/ZDI-26-1071/
- llama.cpp GitHub Fix PR #31336 — https://github.com/ggml-org/llama.cpp/pull/31336
- NVD CVE-2026-131828 — https://nvd.nist.gov/vuln/detail/CVE-2026-131828
- MITRE CVE Record CVE-2026-131828 — https://www.cve.org/CVERecord?id=CVE-2026-131828
- Official llama.cpp GitHub Repository — https://github.com/ggml-org/llama.cpp
Advisory ini disajikan tim ICT Cybersecurity PT Pertamina Bina Medika IHC sebagai informasi kesadaran keamanan. Verifikasi pada sumber resmi sebelum tindakan.