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.
{
"cna_assigner": "VulnCheck",
"cwe_ids": [
"CWE-122",
"CWE-190"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/70xxx/CVE-2026-70638.json"
}"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-70638.json"
[
{
"deprecated": false,
"digest": {
"line_hashes": [
"334411191698948442196723930483104454060",
"37366638444284429051614071922669106979",
"139232692773709095660313632590427735062",
"5259375327948776342389338159184170899"
],
"threshold": 0.9
},
"id": "CVE-2026-70638-09f5f06e",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/ggml-org/llama.cpp/commit/4b2a4778f81f222c12271ce3b1997990b3071faf",
"target": {
"file": "common/arg.cpp"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "337343721808502297225290834391498754494",
"length": 106923
},
"id": "CVE-2026-70638-8e669eb6",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/ggml-org/llama.cpp/commit/4b2a4778f81f222c12271ce3b1997990b3071faf",
"target": {
"file": "common/arg.cpp",
"function": "common_params_parser_init"
}
}
]
"2026-09-02T08:08:01Z"