{"id":"CVE-2026-70638","aliases":["DEBIAN-CVE-2026-70638","EUVD-2026-54276","GHSA-p56f-gv6x-v6mg"],"status":"published","title":"llama.cpp b1886–b7445 Integer Overflow via new_1batch() in llama-android.cpp","description":"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 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.","severity":{"version":"4.0","score":8.5,"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00231,"percentile":0.14001,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-122","CWE-190"],"published":"2026-08-06T15:35:08Z","modified":"2026-10-31T02:30:28Z","fixes":[{"ecosystem":"Debian:14","package":"llama.cpp","fixed_in":["7593+dfsg-1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:14","package":"llama.cpp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"7593+dfsg-1"}]}],"versions":["5151+dfsg-1~exp2","5151+dfsg-1~exp3","5318+dfsg-1","5318+dfsg-2","5713+dfsg-1","5760+dfsg-1","5760+dfsg-2","5760+dfsg-3","5760+dfsg-4","5882+dfsg-1","5882+dfsg-2","5882+dfsg-3","5882+dfsg-3~exp1","5882+dfsg-3~exp2","5882+dfsg-3~exp3","5882+dfsg-4","6641+dfsg-1","6641+dfsg-2","6641+dfsg-3"]}],"products":[{"vendor":"ggml","product":"llama.cpp"},{"vendor":"ggml-org","product":"llama.cpp"}],"references":[{"url":"https://github.com/ggml-org/llama.cpp/releases/tag/b7446","tags":["release-notes","Patch","Release Notes","Vendor Advisory","advisory"]},{"url":"https://github.com/ggml-org/llama.cpp/commit/5c0d18881e0e9794c96b2602736b758bac9d9388","tags":["patch","Patch","fix"]},{"url":"https://github.com/Vladimir-tokarev-cyera/llama-cpp-security-patches","tags":["related","Patch","Third Party Advisory","package"]},{"url":"https://www.vulncheck.com/advisories/llama-cpp-b1886-b7445-integer-overflow-via-new-1batch-in-llama-android-cpp","tags":["third-party-advisory","Third Party Advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-70638","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-p56f-gv6x-v6mg"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/70xxx/CVE-2026-70638.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-70638","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2026-70638","title":"llama.cpp b1886–b7445 Integer Overflow via new_1batch() in llama-android.cpp","description":"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 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.","status":"published","published":"2026-08-06T15:35:08.09Z","modified":"2026-11-08T14:08:32.07Z","cvss":[{"version":"4.0","score":8.5,"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"high","assessor":"cna"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-190","CWE-122"],"updated_at":"2026-11-08T15:43:34.234229Z"}],"euvd":[{"id":"EUVD-2026-54276","description":"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 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.","status":"published","published":"2026-08-06T15:35:08Z","modified":"2026-11-08T14:08:32Z","cvss":[{"version":"4.0","score":8.5,"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"high"}],"updated_at":"2026-11-08T15:13:06.469155Z"}],"ghsa":[{"id":"GHSA-p56f-gv6x-v6mg","title":"llama.cpp builds b1886 through b7445 contain an integer overflow vulnerability in the LLaMA...","description":"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 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.","status":"published","published":"2026-08-07T00:31:22Z","modified":"2026-08-07T21:30:32Z","cvss":[{"version":"4.0","score":8.5,"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-122"],"updated_at":"2026-11-02T15:10:12.306859Z"}],"nvd":[{"id":"CVE-2026-70638","description":"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 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.","status":"published","published":"2026-08-06T22:18:28.633Z","modified":"2026-10-29T21:17:30.89Z","cvss":[{"version":"4.0","score":8.5,"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high","assessor":"secondary"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-122","CWE-190"],"updated_at":"2026-11-02T14:12:35.386166Z"}],"osv":[{"id":"CVE-2026-70638","title":"llama.cpp b1886–b7445 Integer Overflow via new_1batch() in llama-android.cpp","description":"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 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.","status":"published","published":"2026-08-06T15:35:08.09Z","modified":"2026-11-09T02:47:24.634398132Z","cvss":[{"version":"4.0","score":8.5,"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"high"}],"cwes":["CWE-122","CWE-190"],"updated_at":"2026-11-09T03:16:17.543303Z"},{"id":"DEBIAN-CVE-2026-70638","description":"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 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.","status":"published","published":"2026-08-06T22:18:28.633Z","modified":"2026-10-30T09:49:04.796705093Z","cvss":[{"version":"4.0","score":8.5,"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high"}],"updated_at":"2026-11-02T15:46:02.094661Z"}]}}
