Skip to content
Heist/ feed
Back to feed
High

llama.cpp before b3701 Out-of-Bounds Read in llama_decode via Token IDs

Type: advisorySources: Official CVE List

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.

Products
llama.cpp
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-58400
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 13:58 UTC · Revision 1

Source evidence

llama.cpp before b3701 Out-of-Bounds Read in llama_decode via Token IDs

core-cve · Original source

Published 27 Oct 2026, 00:33 UTC

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.

cve:CVE-2024-58400

llama.cpp

Fixed versions: Not specified

Complete source record
{
  "id": "4676b737a554cc76ddaa3f7157a5993f69f4d05b67a8b9190b2457d4a5c87fe9",
  "url": "https://www.cve.org/CVERecord?id=CVE-2024-58400",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "llama.cpp before b3701 Out-of-Bounds Read in llama_decode via Token IDs",
    "summary": "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.",
    "evidence": "cve:CVE-2024-58400",
    "products": [
      {
        "name": {
          "value": "llama.cpp",
          "evidence": "/containers/cna/affected/0/product"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2024-58400",
      "aliases": [
        "CVE-2024-58400"
      ],
      "metrics": [
        {
          "format": "CVSS",
          "cvssV4_0": {
            "version": "4.0",
            "baseScore": 8.8,
            "attackVector": "NETWORK",
            "baseSeverity": "HIGH",
            "vectorString": "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",
            "userInteraction": "NONE",
            "attackComplexity": "LOW",
            "attackRequirements": "NONE",
            "privilegesRequired": "NONE",
            "subIntegrityImpact": "NONE",
            "vulnIntegrityImpact": "NONE",
            "subAvailabilityImpact": "NONE",
            "vulnAvailabilityImpact": "HIGH",
            "subConfidentialityImpact": "NONE",
            "vulnConfidentialityImpact": "LOW"
          }
        },
        {
          "format": "CVSS",
          "cvssV3_1": {
            "scope": "UNCHANGED",
            "version": "3.1",
            "baseScore": 8.2,
            "attackVector": "NETWORK",
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H",
            "integrityImpact": "NONE",
            "userInteraction": "NONE",
            "attackComplexity": "LOW",
            "availabilityImpact": "HIGH",
            "privilegesRequired": "NONE",
            "confidentialityImpact": "LOW"
          }
        }
      ],
      "affected": [
        {
          "vendor": "ggml-org",
          "product": "llama.cpp",
          "versions": [
            {
              "status": "affected",
              "version": "0",
              "lessThan": "b3701",
              "versionType": "custom"
            }
          ],
          "packageURL": "pkg:github/ggml-org/llama.cpp",
          "defaultStatus": "unaffected"
        }
      ],
      "modified": "2026-10-27T14:14:21.519Z",
      "provider": "cve",
      "references": [
        "https://github.com/ggml-org/llama.cpp/pull/9359",
        "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/blob/b3681/examples/server/server.cpp#L789",
        "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"
      ],
      "provider_metadata": {
        "adp": [
          {
            "title": "CISA ADP Vulnrichment",
            "metrics": [
              {
                "other": {
                  "type": "ssvc",
                  "content": {
                    "id": "CVE-2024-58400",
                    "role": "CISA Coordinator",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "yes"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "version": "2.0.3",
                    "timestamp": "2026-10-27T13:46:15.115363Z"
                  }
                }
              }
            ],
            "providerMetadata": {
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP",
              "dateUpdated": "2026-10-27T14:14:21.519Z"
            }
          }
        ],
        "cna": {
          "orgId": "83251b91-4cc7-4094-a5c7-464a1b83ea10",
          "shortName": "VulnCheck",
          "dateUpdated": "2026-10-27T00:33:57.354Z"
        }
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-58400",
        "evidence": "/cveMetadata/cveId"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/containers/cna/metrics"
  },
  "source_id": "core-cve",
  "document_id": 392664,
  "published_at": "2026-10-27T00:33:57.354+00:00"
}