{"id":"CVE-2026-70638","revision":"90bc5152409a44479624e16b7814219e","records":[{"revision":"90bc5152409a44479624e16b7814219e","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-70638","aliases":[],"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.","state":0,"publishedAt":"2026-08-06T15:35:08.09+00:00","modifiedAt":"2026-08-14T16:51:38.084+00:00","affected":[{"ecosystem":"Vendor product","name":"llama.cpp","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"ggml-org\",\n                    \"product\": \"llama.cpp\",\n                    \"versions\": [\n                        {\n                            \"status\": \"affected\",\n                            \"version\": \"b1886\",\n                            \"lessThanOrEqual\": \"b7445\",\n                            \"versionType\": \"custom\"\n                        },\n                        {\n                            \"status\": \"affected\",\n                            \"version\": \"0.9.0\",\n                            \"lessThanOrEqual\": \"0.17.1\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"status\": \"unaffected\",\n                            \"version\": \"5c0d18881e0e9794c96b2602736b758bac9d9388\",\n                            \"versionType\": \"git\"\n                        }\n                    ],\n                    \"defaultStatus\": \"unaffected\"\n                }"}],"metrics":[{"system":"CVSS 4.0","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","score":8.5,"severity":"HIGH"},{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"severity":"HIGH"}],"references":["https://github.com/ggml-org/llama.cpp/releases/tag/b7446","https://github.com/ggml-org/llama.cpp/commit/5c0d18881e0e9794c96b2602736b758bac9d9388","https://github.com/Vladimir-tokarev-cyera/llama-cpp-security-patches","https://www.vulncheck.com/advisories/llama-cpp-b1886-b7445-integer-overflow-via-new-1batch-in-llama-android-cpp"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-70638","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-70638","identifiers":["CVE-2026-70638"]},"retained":false,"historicalAffected":[]}],"coverage":[]}