{"id":"CVE-2024-58400","aliases":["EUVD-2024-55827","GHSA-7wfj-q343-9m2r","UBUNTU-CVE-2024-58400"],"status":"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.","severity":{"version":"4.0","score":8.8,"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","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00422,"percentile":0.36965,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-129"],"published":"2026-10-27T00:33:57Z","modified":"2026-10-29T07:31:31Z","affected":[{"source":"osv","ecosystem":"Ubuntu:26.10","package":"llama.cpp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8681+dfsg-1","9721+dfsg-1ubuntu1","10438+dfsg-1","10438+dfsg-1ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"llama.cpp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5882+dfsg-2","8064+dfsg-1ubuntu1","8681+dfsg-1"]}],"products":[{"vendor":"ggml-org","product":"llama.cpp"}],"references":[{"url":"https://github.com/ggml-org/llama.cpp/pull/9359","tags":["patch","issue-tracking","fix","report"]},{"url":"https://github.com/ggml-org/llama.cpp/commit/faf69d4237c9ae4d7f572b4674d1002463e8acd3","tags":["patch","fix","report"]},{"url":"https://github.com/ggml-org/llama.cpp/commit/eae597182cb61bbde0b26e7cec5999d28b9327fe","tags":["patch","fix","report"]},{"url":"https://github.com/ggml-org/llama.cpp/blob/b3681/examples/server/server.cpp#L789","tags":["technical-description","article"]},{"url":"https://github.com/ggml-org/llama.cpp/releases/tag/b3701","tags":["release-notes","advisory","report"]},{"url":"https://www.vulncheck.com/advisories/llama-cpp-before-b3701-out-of-bounds-read-in-llama-decode-via-token-ids","tags":["third-party-advisory","advisory","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-58400","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-7wfj-q343-9m2r"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/58xxx/CVE-2024-58400.json","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2024-58400","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-58400","tags":["report"]},{"url":"https://github.com/cveproject/cvelistv5/tree/main/cves/2024/58xxx/cve-2024-58400.json","tags":["report"]},{"url":"https://github.com/ggml-org/llama.cpp/blob/b3681/examples/server/server.cpp#l789","tags":["report"]},{"url":"https://nvd.nist.gov/vuln/detail/cve-2024-58400","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2024-58400","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.","status":"published","published":"2026-10-27T00:33:57.354Z","modified":"2026-10-27T14:14:21.519Z","cvss":[{"version":"4.0","score":8.8,"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","level":"high","assessor":"cna"},{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-129"],"updated_at":"2026-11-02T14:34:08.843708Z"}],"euvd":[{"id":"EUVD-2024-55827","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.","status":"published","published":"2026-10-27T00:33:57Z","modified":"2026-10-27T14:14:21Z","cvss":[{"version":"4.0","score":8.8,"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","level":"high"}],"updated_at":"2026-11-02T16:59:23.601588Z"}],"ghsa":[{"id":"GHSA-7wfj-q343-9m2r","title":"llama.cpp before b3701 contains an out-of-bounds read vulnerability in llama_decode_internal and...","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.","status":"published","published":"2026-10-27T03:32:10Z","modified":"2026-10-27T03:32:10Z","cvss":[{"version":"4.0","score":8.8,"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/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","level":"high"},{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H","level":"high"}],"cwes":["CWE-129"],"updated_at":"2026-11-02T15:14:28.078787Z"}],"nvd":[{"id":"CVE-2024-58400","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.","status":"published","published":"2026-10-27T01:19:03.08Z","modified":"2026-10-27T23:10:00.153Z","cvss":[{"version":"4.0","score":8.8,"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/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","level":"high","assessor":"secondary"},{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-129"],"updated_at":"2026-11-02T14:10:47.77313Z"}],"osv":[{"id":"CVE-2024-58400","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.","status":"published","published":"2026-10-27T00:33:57.354Z","modified":"2026-10-29T07:31:31.745542083Z","cvss":[{"version":"4.0","score":8.8,"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","level":"high"}],"cwes":["CWE-129"],"updated_at":"2026-11-02T15:44:45.107804Z"},{"id":"UBUNTU-CVE-2024-58400","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.","status":"published","published":"2026-10-27T01:19:00Z","modified":"2026-10-28T20:15:31.475445897Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H","level":"high"},{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H","level":"high"},{"version":"4.0","score":8.8,"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","level":"high"},{"version":"4.0","score":8.8,"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","level":"high"}],"updated_at":"2026-11-02T16:55:18.664792Z"}]}}
