CVE-2024-58400
8.2 HIGHpublic exploit availablePublished 2026-10-27 · Updated 2026-10-27
AI risk analysis
- Summary
- An out-of-bounds read flaw exists in llama.cpp before commit b3701, where unauthenticated remote attackers can supply token IDs outside the valid range (0 to n_vocab-1) via the /completion endpoint, causing the server to read memory beyond intended bounds and potentially leak sensitive data or crash.
- Exploitability
- Exploitation is straightforward for unauthenticated remote attackers with network access to the llama-server /completion endpoint; no authentication or special privileges are required.
- Blast radius
- Successful exploitation could allow an attacker to read server memory contents, potentially exposing embeddings or other sensitive in-memory data, and may cause denial of service via process crash.
- Detection
- No reliable host or network indicator is derivable from the published description.
- Prioritized remediation
- Upgrade to llama.cpp commit b3701 or later, which includes validation of token IDs to prevent out-of-bounds reads in llama_decode_internal and llama_encode_internal.
Analysis generated locally by garnet-coder (no data left the box). AI-assisted — verify against primary sources before acting.
NVD 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 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
Weaknesses
CWE-129
Public exploit & PoC references
- https://github.com/ggml-org/llama.cpp/blob/b3681/examples/server/server.cpp#L789
- https://github.com/ggml-org/llama.cpp/commit/eae597182cb61bbde0b26e7cec5999d28b9327fe
- https://github.com/ggml-org/llama.cpp/commit/faf69d4237c9ae4d7f572b4674d1002463e8acd3
- https://github.com/ggml-org/llama.cpp/pull/9359
- https://github.com/ggml-org/llama.cpp/releases/tag/b3701
All references
- https://github.com/ggml-org/llama.cpp/blob/b3681/examples/server/server.cpp#L789
- https://github.com/ggml-org/llama.cpp/commit/eae597182cb61bbde0b26e7cec5999d28b9327fe
- https://github.com/ggml-org/llama.cpp/commit/faf69d4237c9ae4d7f572b4674d1002463e8acd3
- https://github.com/ggml-org/llama.cpp/pull/9359
- 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
Source data: NVD (nvd.nist.gov), public domain. Exploit-DB.ai adds local AI analysis for defensive use only.
Related CVEs
- HIGHCVE-2026-111282PoC
- HIGHCVE-2026-61721PoC
- HIGHCVE-2026-62958PoC
- HIGHCVE-2026-62967PoC
- CRITICALCVE-2026-7826PoC
- HIGHCVE-2026-93442
- HIGHCVE-2026-96644PoC
- HIGHCVE-2013-10076PoC
Related by shared AI tags and CWE weakness class. Browse the full archive.