{"id":"CVE-2024-58400","published":"2026-10-27T00:33:57Z","modified":"2026-10-27T14:14:21Z","title":"llama.cpp before b3701 Out-of-Bounds Read in llama_decode via Token IDs","vendor":"ggml-org","product":"llama.cpp","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.2,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00422,"percentile":0.37259,"provenance":"source"},"cwes":[{"id":"CWE-129","name":"Improper Validation of Array Index"}],"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"]},{"url":"https://www.vulncheck.com/advisories/llama-cpp-before-b3701-out-of-bounds-read-in-llama-decode-via-token-ids","tags":["third-party-advisory"]}],"priority":{"score":13.2,"factors":[{"name":"EPSS percentile","points":7.45},{"name":"CVSS severity","points":5.74}]},"vendorSlug":"ggml-org","affectedVersions":[{"vendor":"ggml-org","product":"llama.cpp","versions":["< b3701"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-10-27T13:46:15.115363Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2024-55827","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-ggml-org-llama-cpp-cve-2025-49847","parents":[{"from":"CVE-2025-52566","to":"CVE-2024-58400","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["common/common.cpp"],"commits":["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/commit/dd6e6d0b6a4bbe3ebfc931d1eb14db2f2b1d70af"],"basis":"rarely changed file"}]}]}}