llama.cpp — security advisory
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.
- Products
- llama.cpp
- Affected versions
- 10438+dfsg-1, 10438+dfsg-1ubuntu1, 5318+dfsg-1, 5318+dfsg-2, 5713+dfsg-1, 5760+dfsg-1, 5760+dfsg-3, 5760+dfsg-4, 5882+dfsg-2, 8064+dfsg-1ubuntu1, 8681+dfsg-1, 9721+dfsg-1ubuntu1
- Fixed versions
- Not specified
- CVEs
- CVE-2026-33298
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 02:59 UTC · Revision 1
Source evidence
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.
osv:UBUNTU-CVE-2026-33298
llama.cpp
Fixed versions: Not specified
llama.cpp
Fixed versions: Not specified
llama.cpp
Fixed versions: Not specified
Complete source record
{
"id": "f846c31491c597246c5876e800d206b774c70f4208d35777b36eefc3f32fd696",
"url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-33298",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "UBUNTU-CVE-2026-33298",
"summary": "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.",
"evidence": "osv:UBUNTU-CVE-2026-33298",
"products": [
{
"name": {
"value": "llama.cpp",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "5318+dfsg-1",
"evidence": "/affected/0/versions"
},
{
"value": "5318+dfsg-2",
"evidence": "/affected/0/versions"
},
{
"value": "5713+dfsg-1",
"evidence": "/affected/0/versions"
},
{
"value": "5760+dfsg-1",
"evidence": "/affected/0/versions"
},
{
"value": "5760+dfsg-3",
"evidence": "/affected/0/versions"
},
{
"value": "5760+dfsg-4",
"evidence": "/affected/0/versions"
},
{
"value": "5882+dfsg-2",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "llama.cpp",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "8681+dfsg-1",
"evidence": "/affected/1/versions"
},
{
"value": "9721+dfsg-1ubuntu1",
"evidence": "/affected/1/versions"
},
{
"value": "10438+dfsg-1",
"evidence": "/affected/1/versions"
},
{
"value": "10438+dfsg-1ubuntu1",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "llama.cpp",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "5882+dfsg-2",
"evidence": "/affected/2/versions"
},
{
"value": "8064+dfsg-1ubuntu1",
"evidence": "/affected/2/versions"
},
{
"value": "8681+dfsg-1",
"evidence": "/affected/2/versions"
}
]
}
],
"severity": "high",
"structured": {
"id": "UBUNTU-CVE-2026-33298",
"aliases": [
"UBUNTU-CVE-2026-33298"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
},
{
"type": "Ubuntu",
"score": "medium"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "llama.cpp",
"purl": "pkg:deb/ubuntu/llama.cpp?arch=source&distro=questing",
"ecosystem": "Ubuntu:25.10"
},
"versions": [
"5318+dfsg-1",
"5318+dfsg-2",
"5713+dfsg-1",
"5760+dfsg-1",
"5760+dfsg-3",
"5760+dfsg-4",
"5882+dfsg-2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-33298.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "llama.cpp",
"binary_version": "5882+dfsg-2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "llama.cpp",
"purl": "pkg:deb/ubuntu/llama.cpp?arch=source&distro=stonking",
"ecosystem": "Ubuntu:26.10"
},
"versions": [
"8681+dfsg-1",
"9721+dfsg-1ubuntu1",
"10438+dfsg-1",
"10438+dfsg-1ubuntu1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-33298.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libllama0",
"binary_version": "10438+dfsg-1ubuntu1"
},
{
"binary_name": "llama.cpp",
"binary_version": "10438+dfsg-1ubuntu1"
},
{
"binary_name": "llama.cpp-examples",
"binary_version": "10438+dfsg-1ubuntu1"
},
{
"binary_name": "llama.cpp-services",
"binary_version": "10438+dfsg-1ubuntu1"
},
{
"binary_name": "llama.cpp-tests",
"binary_version": "10438+dfsg-1ubuntu1"
},
{
"binary_name": "llama.cpp-tools",
"binary_version": "10438+dfsg-1ubuntu1"
},
{
"binary_name": "llama.cpp-tools-extra",
"binary_version": "10438+dfsg-1ubuntu1"
},
{
"binary_name": "python3-gguf",
"binary_version": "10438+dfsg-1ubuntu1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "llama.cpp",
"purl": "pkg:deb/ubuntu/llama.cpp?arch=source&distro=resolute",
"ecosystem": "Ubuntu:26.04:LTS"
},
"versions": [
"5882+dfsg-2",
"8064+dfsg-1ubuntu1",
"8681+dfsg-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-33298.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libllama0",
"binary_version": "8681+dfsg-1"
},
{
"binary_name": "llama.cpp",
"binary_version": "8681+dfsg-1"
},
{
"binary_name": "llama.cpp-examples",
"binary_version": "8681+dfsg-1"
},
{
"binary_name": "llama.cpp-tests",
"binary_version": "8681+dfsg-1"
},
{
"binary_name": "llama.cpp-tools",
"binary_version": "8681+dfsg-1"
},
{
"binary_name": "llama.cpp-tools-extra",
"binary_version": "8681+dfsg-1"
},
{
"binary_name": "python3-gguf",
"binary_version": "8681+dfsg-1"
}
]
}
}
],
"modified": "2026-10-17T12:59:59.832824925Z",
"provider": "osv",
"upstream": [
"CVE-2026-33298"
],
"references": [
"https://ubuntu.com/security/CVE-2026-33298",
"https://www.cve.org/CVERecord?id=CVE-2026-33298",
"https://github.com/ggml-org/llama.cpp/releases/tag/b7824",
"https://github.com/ggml-org/llama.cpp/security/advisories/GHSA-96jg-mvhq-q7q7"
]
},
"related_cves": [
{
"value": "CVE-2026-33298",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 360090,
"published_at": "2026-03-24T01:17:00+00:00"
}