{"id":"CVE-2026-70638","title":"llama.cpp builds b1886 through b7445 contain an integer overflow vulnerability in the LLaMA-Android JNI wrapper where the new_1batch() function multiplies sizeof(llama_seq_id) by an attacker-controlled n_seq_max parameter without overflo…","summary":"llama.cpp builds b1886 through b7445 contain an integer overflow vulnerability in the LLaMA-Android JNI wrapper where the new_1batch() function multiplies sizeof(llama_seq_id) by an attacker-controlled n_seq_max parameter without overflo…","severity":"high","cvss":7.8,"cvssVector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","cwe":["CWE-122","CWE-190"],"vendor":"ggml","product":"llama.cpp","affected":["llama.cpp >= b1886, <= b7445"],"published":"2026-08-06","updated":"2026-09-21","sourceUpdated":"2026-09-21T18:11:01.283","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-70638","references":[{"url":"https://github.com/Vladimir-tokarev-cyera/llama-cpp-security-patches","label":"disclosure@vulncheck.com"},{"url":"https://github.com/ggml-org/llama.cpp/commit/5c0d18881e0e9794c96b2602736b758bac9d9388","label":"disclosure@vulncheck.com"},{"url":"https://github.com/ggml-org/llama.cpp/releases/tag/b7446","label":"disclosure@vulncheck.com"},{"url":"https://www.vulncheck.com/advisories/llama-cpp-b1886-b7445-integer-overflow-via-new-1batch-in-llama-android-cpp","label":"disclosure@vulncheck.com"}],"tags":["nvd","exploit-available"],"epss":0.00209,"epssPercentile":0.11337,"exploits":{"github":1,"githubRepos":["https://github.com/Hunt-Benito/one-multiply-too-many-cve-2026-70638-llama-cpp-android-jni-integer-overflow"],"checkedAt":"2026-09-21T18:51:31.478Z"},"exploitAvailable":true,"ingestedAt":"2026-09-21T18:50:57.546Z","slug":"CVE-2026-70638","body":"## Overview\n\nllama.cpp builds b1886 through b7445 contain an integer overflow vulnerability in the LLaMA-Android JNI wrapper where the new_1batch() function multiplies sizeof(llama_seq_id) by an attacker-controlled n_seq_max parameter without overflow validation, causing heap buffer allocation to wrap and allocate insufficient memory. Attackers can exploit this by providing a crafted n_seq_max value through a malicious model file or JNI call to trigger heap corruption and achieve denial of service or arbitrary code execution on Android applications using the LLaMA-Android binding.\n\n## Affected\n\n- `llama.cpp >= b1886, <= b7445`\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.","depth":"midnight","depthScore":55,"depthScoreParts":{"impact":42.9,"likelihood":0,"exploitation":12,"ransomware":0},"changes":[]}