{"id":"CVE-2024-58400","state":"PUBLISHED","title":"llama.cpp before b3701 Out-of-Bounds Read in llama_decode via Token IDs","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.","publishedAt":"2026-10-27T00:33:57.354Z","updatedAt":"2026-10-27T14:14:21.519Z","severity":{"score":8.8,"label":"High","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N","source":"VulnCheck"},"assigner":"VulnCheck","products":["ggml-org llama.cpp"],"affected":[{"vendor":"ggml-org","product":"llama.cpp","packageURL":"pkg:github/ggml-org/llama.cpp","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"b3701","versionType":"custom"}]}],"references":["https://github.com/ggml-org/llama.cpp/pull/9359","https://github.com/ggml-org/llama.cpp/commit/faf69d4237c9ae4d7f572b4674d1002463e8acd3","https://github.com/ggml-org/llama.cpp/commit/eae597182cb61bbde0b26e7cec5999d28b9327fe","https://github.com/ggml-org/llama.cpp/blob/b3681/examples/server/server.cpp#L789","https://github.com/ggml-org/llama.cpp/releases/tag/b3701","https://www.vulncheck.com/advisories/llama-cpp-before-b3701-out-of-bounds-read-in-llama-decode-via-token-ids"],"weaknesses":["CWE-129"],"ingestedAt":"2026-10-29T20:08:12.933Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/58xxx/CVE-2024-58400.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-58400","state":"PUBLISHED","datePublished":"2026-10-27T00:33:57.354Z","dateUpdated":"2026-10-27T14:14:21.519Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-10-27T00:10:21.403Z"},"containers":{"cna":{"title":"llama.cpp before b3701 Out-of-Bounds Read in llama_decode via Token IDs","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"ggml-org","product":"llama.cpp","packageURL":"pkg:github/ggml-org/llama.cpp","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"b3701","versionType":"custom"}]}],"references":[{"url":"https://github.com/ggml-org/llama.cpp/pull/9359","tags":["patch","issue-tracking"]},{"url":"https://github.com/ggml-org/llama.cpp/commit/faf69d4237c9ae4d7f572b4674d1002463e8acd3","tags":["patch"]},{"url":"https://github.com/ggml-org/llama.cpp/commit/eae597182cb61bbde0b26e7cec5999d28b9327fe","tags":["patch"]},{"url":"https://github.com/ggml-org/llama.cpp/blob/b3681/examples/server/server.cpp#L789","tags":["technical-description"]},{"url":"https://github.com/ggml-org/llama.cpp/releases/tag/b3701","tags":["release-notes"],"name":"llama.cpp b3701 Release Notes"},{"url":"https://www.vulncheck.com/advisories/llama-cpp-before-b3701-out-of-bounds-read-in-llama-decode-via-token-ids","name":"VulnCheck Advisory: llama.cpp before b3701 Out-of-Bounds Read in llama_decode via Token IDs","tags":["third-party-advisory"]}],"metrics":[{"format":"CVSS","cvssV4_0":{"version":"4.0","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N","attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"LOW","vulnIntegrityImpact":"NONE","vulnAvailabilityImpact":"HIGH","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","baseScore":8.8,"baseSeverity":"HIGH"}},{"format":"CVSS","cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"LOW","integrityImpact":"NONE","availabilityImpact":"HIGH","baseScore":8.2,"baseSeverity":"HIGH"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-129","lang":"en","description":"Improper Validation of Array Index","type":"CWE"}]}],"providerMetadata":{"shortName":"VulnCheck","orgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateUpdated":"2026-10-27T00:33:57.354Z"},"datePublic":"2024-09-08T00:00:00.000Z","cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:ggml:llama.cpp:*:*:*:*:*:*:*:*","versionEndExcluding":"b3701"}]}]}],"credits":[{"lang":"en","value":"Jeongwoo Lee","type":"reporter"},{"lang":"en","value":"slaren","type":"remediation developer"},{"lang":"en","value":"ggerganov","type":"remediation developer"}],"x_generator":{"engine":"vulncheck-endgame"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-10-27T13:46:15.115363Z","id":"CVE-2024-58400","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-27T14:14:21.519Z"}}]}}}