---
title: "CVE-2024-58400: llama.cpp - Out of Bounds Read"
description: "llama.cpp before b3701 contains an out-of-bounds read vulnerability caused by unvalidated token IDs in llama_decode_internal and llama_encode_internal, letting remote unauthenticated attackers read memory or crash the process by sending crafted integer-array prompts to /completion endpoint."
url: https://panop.io/threat-heartbeat/CVE-2024-58400/
---

# CVE-2024-58400 llama.cpp - Out of Bounds Read

llama.cpp before b3701 contains an out-of-bounds read vulnerability caused by unvalidated token IDs in llama\_decode\_internal and llama\_encode\_internal, letting remote unauthenticated attackers read memory or crash the process by sending crafted integer-array prompts to /completion endpoint.

CVSS base score 8.2 /10

High

CISA KEV

Not listed

Public exploit

None known

Authentication

Not required

[View the NVD record ↗](https://nvd.nist.gov/vuln/detail/CVE-2024-58400)

## Details

Type

Out of Bounds Read

Impact

Information Disclosure, Denial Of Service

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H

Published

27 October 2026

Updated

27 October 2026

Weakness

[CWE-129](https://cwe.mitre.org/data/definitions/129.html)

## Vendor fix

Update to version b3701 or later.

Patching closes this CVE. It does not tell you which of your systems run the affected version, or what else is exposed alongside them.

## References

- [https://nvd.nist.gov/vuln/detail/CVE-2024-58400](https://nvd.nist.gov/vuln/detail/CVE-2024-58400)
- [https://github.com/ggml-org/llama.cpp/pull/9359](https://github.com/ggml-org/llama.cpp/pull/9359)
- [https://github.com/ggml-org/llama.cpp/releases/tag/b3701](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](https://www.vulncheck.com/advisories/llama-cpp-before-b3701-out-of-bounds-read-in-llama-decode-via-token-ids)
- [https://github.com/ggml-org/llama.cpp/blob/b3681/examples/server/server.cpp#L789](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/eae597182cb61bbde0b26e7cec5999d28b9327fe)
- [https://github.com/ggml-org/llama.cpp/commit/faf69d4237c9ae4d7f572b4674d1002463e8acd3](https://github.com/ggml-org/llama.cpp/commit/faf69d4237c9ae4d7f572b4674d1002463e8acd3)

[← All CVEs](https://panop.io/threat-heartbeat/)

## What this record can't tell you

- Whether you run the affected software, and where
- Whether an attacker can actually reach and exploit it
- The misconfigurations that never get a CVE number
- What it would cost the business, ranked into what to fix first

Panop answers these inside your environment, for this CVE and every other finding.

[Book a demo](https://panop.io/demo)
