---
title: llama.cpp CVE-2026-126974: a malicious GGUF file can trigger an integer overflow and run code; fixed in build b11972 | ctxsec
url: https://ctxsec.com/items/llama-cpp-cve-2026-126974-zdi-26-975-gguf-integer-overflow-rce-fixed-b11972
description: "Trend Micro's Zero Day Initiative disclosed ZDI-26-975 (CVE-2026-126974, CVSS 7.8) on Nov 13: llama.cpp doesn't properly validate user-supplied data when parsing GGUF files, so an integer overflow can lead to a memory write and code execution in the llama.cpp process when a user opens a malicious file. ZDI says it was reported on Oct 28 and points to llama.cpp PR #31336 as the fix, merged the same day, which bounds control-vector layer indices (control vectors are loaded from GGUF files) and computes sizes in size_t, and also fixes an out-of-bounds write in the M-RoPE position loops of several vision encoders. The first release build containing the fix is b11972."
status: "official (ZDI advisory ZDI-26-975, Nov 13, 2026; fix merged in llama.cpp Oct 28, 2026); no exploitation reported"
published: 2026-11-13
---

> Trend Micro's Zero Day Initiative disclosed ZDI-26-975 (CVE-2026-126974, CVSS 7.8) on Nov 13: llama.cpp doesn't properly validate user-supplied data when parsing GGUF files, so an integer overflow can lead to a memory write and code execution in the llama.cpp process when a user opens a malicious file. ZDI says it was reported on Oct 28 and points to llama.cpp PR #31336 as the fix, merged the same day, which bounds control-vector layer indices (control vectors are loaded from GGUF files) and computes sizes in size_t, and also fixes an out-of-bounds write in the M-RoPE position loops of several vision encoders. The first release build containing the fix is b11972.

[← AI](/ai) · [markdown](/items/llama-cpp-cve-2026-126974-zdi-26-975-gguf-integer-overflow-rce-fixed-b11972.md)

official (ZDI advisory ZDI-26-975, Nov 13, 2026; fix merged in llama.cpp Oct 28, 2026); no exploitation reported

2026-11-13 11:39 PM ET

### llama.cpp CVE-2026-126974: a malicious GGUF file can trigger an integer overflow and run code; fixed in build b11972

- **Update:** run llama.cpp b11972 or later, and check bundled copies in apps and wrappers built on llama.cpp, which may lag upstream.
- **Treat model files as code:** load GGUF models, control vectors and multimodal projectors only from sources you trust, and verify hashes for files pulled from model hubs.
- **Contain:** run inference servers as unprivileged users or in containers without access to secrets.

Sources: [Zero Day Initiative ZDI-26-975: llama.cpp GGUF File Parsing Integer Overflow Remote Code Execution Vulnerability (CVE-2026-126974, Nov 13, 2026)](https://www.zerodayinitiative.com/advisories/ZDI-26-975/) · [llama.cpp PR #31336: common, mtmd: bound control vector layer indices and M-RoPE position loops (merged Oct 28, 2026)](https://github.com/ggml-org/llama.cpp/pull/31336) · [llama.cpp release b11972 (first build containing the fix, Oct 28, 2026)](https://github.com/ggml-org/llama.cpp/releases/tag/b11972)
