← Back to search

CVE-2024-58400

8.2 HIGHpublic exploit available

Published 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.
out-of-bounds-readmemory-disclosuredosweb-api

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

All references

Source data: NVD (nvd.nist.gov), public domain. Exploit-DB.ai adds local AI analysis for defensive use only.

Related CVEs

Related by shared AI tags and CWE weakness class. Browse the full archive.