llama.cpp is an inference of several LLM models in C/C++. Prior to b7824, an integer overflow vulnerability in the ggml_nbytes function allows an attacker to bypass memory validation by crafting a GGUF file with specific tensor dimensions. This causes ggml_nbytes to return a significantly smaller size than required (e.g., 4MB instead of Exabytes), leading to a heap-based buffer overflow when the application subsequently processes the tensor. This vulnerability allows potential Remote Code Execution (RCE) via memory corruption. b7824 contains a fix.
{
"cna_assigner": "GitHub_M",
"cwe_ids": [
"CWE-122",
"CWE-190"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/33xxx/CVE-2026-33298.json"
}"2026-04-12T20:14:10Z"
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-33298.json"
[
{
"signature_version": "v1",
"digest": {
"length": 6522.0,
"function_hash": "22358486862683334980512734274788467507"
},
"target": {
"function": "get_handcrafted_file",
"file": "tests/test-gguf.cpp"
},
"source": "https://github.com/ggml-org/llama.cpp/commit/4e5b83b226919c146fbfa754641a6772bcb2d722",
"signature_type": "Function",
"id": "CVE-2026-33298-0883d151",
"deprecated": false
},
{
"signature_version": "v1",
"digest": {
"length": 3379.0,
"function_hash": "163415546984347785439539335948137508065"
},
"target": {
"function": "test_handcrafted_file",
"file": "tests/test-gguf.cpp"
},
"source": "https://github.com/ggml-org/llama.cpp/commit/4e5b83b226919c146fbfa754641a6772bcb2d722",
"signature_type": "Function",
"id": "CVE-2026-33298-0b87024e",
"deprecated": false
},
{
"signature_version": "v1",
"digest": {
"length": 1967.0,
"function_hash": "260188789174176499308674632253592877692"
},
"target": {
"function": "handcrafted_file_type_name",
"file": "tests/test-gguf.cpp"
},
"source": "https://github.com/ggml-org/llama.cpp/commit/4e5b83b226919c146fbfa754641a6772bcb2d722",
"signature_type": "Function",
"id": "CVE-2026-33298-6bc9c11b",
"deprecated": false
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"211170682623387865082098253327285089871",
"120044008370125575177494162257825944613",
"44913694358557281146934447780783392303",
"56949561654457682615892423101958801666",
"96881856457628300127172833209818340847",
"123681856897346212117210123293534015243",
"41387327109361864569753023596130718268",
"330350693999318445918169698217692356414",
"219722283773997830507307345962885419999",
"83586915672000070043263423677282406963",
"183384031708380619376663385284197855088",
"126843626691047625621381709295470337991",
"31969234527354728336218656868548062019",
"314042531832532431392377375718506827270",
"103211695445274812362610210708457266455",
"137837578305151889369918866637174259961",
"339413833577165026895806482310897150946",
"219658094216951531526448843860050323082",
"336187886802586823576180992345749866239",
"6310499240003936265851225438140202845",
"40002979635901378609263139655343043628",
"156547467959263527479699407127365381026",
"81364341147787986042731873098594004585",
"319905655710039615112879264967051101879",
"3269364595675310122856521485935261278",
"28453011171159354777685647235613487900",
"127189837114244103551819727338650426713",
"170052786644727003389044957332811640085",
"235363503410925701071055484582504284807",
"38734810228678636323758156815764136947",
"297737827783873187629420906263225661335",
"13785171312426226971518019822053961225",
"76780017614593128953493688131596692649",
"177527919838771042738221391350487006604",
"258242569195498219230529713835276352019",
"241571252150762853706881665978606819697"
]
},
"target": {
"file": "tests/test-gguf.cpp"
},
"source": "https://github.com/ggml-org/llama.cpp/commit/4e5b83b226919c146fbfa754641a6772bcb2d722",
"signature_type": "Line",
"id": "CVE-2026-33298-7933078d",
"deprecated": false
},
{
"signature_version": "v1",
"digest": {
"length": 11364.0,
"function_hash": "285200753763549327419620073048847268157"
},
"target": {
"function": "gguf_init_from_file_impl",
"file": "ggml/src/gguf.cpp"
},
"source": "https://github.com/ggml-org/llama.cpp/commit/4e5b83b226919c146fbfa754641a6772bcb2d722",
"signature_type": "Function",
"id": "CVE-2026-33298-c8517286",
"deprecated": false
}
]