llama.cpp Out-of-Bounds Read in llama_decode via Token IDs
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- —
- Confidentiality · integrity · availability
- Low · None · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA.
Summary
llama.cpp from 0 before b3701 contains an out-of-bounds read in llama_decode_internal and llama_encode_internal. The code does not validate token IDs, so an improper array index check (CWE-129) lets reads go past the embedding memory. A remote unauthenticated attacker can send integer-array prompts to the llama-server /completion endpoint with IDs outside 0 to n_vocab to read memory or crash the process.
Written with Claude Haiku 5.5 from the sources below · 2026-10-28
Description from the CNA
llama.cpp before b3701 contains an out-of-bounds read vulnerability in llama_decode_internal and llama_encode_internal that allows remote unauthenticated attackers to read memory by supplying unvalidated token IDs. Attackers can send integer-array prompts to the llama-server /completion endpoint with IDs outside 0 to n_vocab to read embedding memory out of bounds or crash the process.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
Update llama.cpp to b3701, the fixed version.
Written with Claude Haiku 5.5 from the sources below · 2026-10-28
- Fix · CNA llama.cpp (ggml-org) Fixed in b3701
Timeline
- 2026-10-27 Threatist record created from CVE-2024-58400
- 2026-10-27 CISA SSVC decision points changed
- 2026-10-27 Alias added: GHSA-7wfj-q343-9m2r
References
Patch 3
More ggml-org vulnerabilities
- TI-2026-26459 llama.cpp: Unauthenticated RCE via GRAPH_COMPUTE buffer=0 bypass in llama.cpp RPC backend CVSS 3.1CRITICAL 9.8
- TI-2024-28446 llama.cpp allows Arbitrary Address Read in rpc_server::get_tensor CVSS 3.1CRITICAL 9.8
- TI-2026-17570 llama.cpp has Out-of-bounds Write in llama-server CVSS 3.1CRITICAL 9.8
- TI-2024-28447 llama.cpp allows write-what-where in rpc_server::set_tensor CVSS 3.1CRITICAL 10.0
- TI-2024-15627 Integer overflow in ggml-org llama.cpp CVSS 3.1CRITICAL 9.8
- TI-2024-14482 Heap-based buffer overflow in ggml-org llama.cpp CVSS 3.1CRITICAL 9.8
Sources
- CVE-2024-58400 · CVE Program
- CVE-2024-58400 · NVD
- FIRST EPSS
- GHSA-7wfj-q343-9m2r · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences