CVE-2024-58400: llama.cpp before b3701 Out-of-Bounds Read in llama_decode via Token IDs
Vulnerability summary
CVE-2024-58400 is a high (CVSS 8.8) Improper Validation of Array Index vulnerability in ggml-org llama.cpp. EPSS estimates a 0.42% chance of exploitation in the next 30 days, higher than 37.3% of scored vulnerabilities.
Severe, CVSS 8.8 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 0% (FIRST, 20-11-2026)
Source freshness unavailable
How is this decided?Timeline
- 27-10-2026PublishedVulnerability first disclosed.
- 27-10-2026Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
6 scores · 3 sources · 2 versions- NVDNIST8.8HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- OSV · UbuntuEcosystem advisory · calculated8.8HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N
- NVDNIST8.2HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
- OSV · UbuntuEcosystem advisory · calculated8.2HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
EPSS trend
Probability
0.42%
Chance of exploitation in the next 30 days
Percentile
37%
Versus all other CVEs
30-day change
Change unavailable
Change unavailable
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Ggml-org1 product
- llama.cpp< b3701
Ubuntu1 product
- llama.cppAll versions (No fix recorded)
2 vendors · 2 products
References
11 links- github.com/ggml-org/llama.cpp/blob/b3681/examples/server/server.cppTechnical Description
- www.vulncheck.com/advisories/llama-cpp-before-b3701-out-of-bounds-read-in-llama-decode-via-token-idsThird Party AdvisoryREPORT