Description
llama.cpp b5899 before b10261 contains a heap out-of-bounds write vulnerability in llm_tokenizer_plamo2::build that allows attackers to corrupt heap memory via crafted GGUF models. Attackers can supply BYTE-typed token text like <0x-1> whose negative parsed value writes token ids before the bytes_ buffer during model loading, causing crashes or potential code execution.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| ggml-org | llama.cpp | b5899 – < b10261 | b10261 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | llama.cpp | 10271+dfsg-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | llama.cpp | No fix yet | — |
| Ubuntu 26.04 LTS | llama.cpp | No fix yet | — |
References
- https://github.com/ggml-org/llama.cpp/pull/25969 issue-tracking patch
- https://github.com/ggml-org/llama.cpp/pull/26511 patch issue-tracking
- https://github.com/ggml-org/llama.cpp/commit/cf06ad7dfe79e7bf2934150d4fefe1ce8db05490 patch
- https://github.com/ggml-org/llama.cpp/blob/b10259/src/llama-vocab.cpp#L1376-L1377 technical-description
- llama.cpp b10261 Release Notes release-notes
- VulnCheck Advisory: llama.cpp b5899 before b10261 Heap Out-of-Bounds Write via plamo2 Tokenizer third-party-advisory