llama.cpp b5899 before b10261 Heap Out-of-Bounds Write via plamo2 Tokenizer
Impact
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 whose negative parsed value writes token ids before the bytes_ buffer during model loading, causing crashes or potential code execution.
Source excerpt · VulnCheckAffected packages
Affected products
Vendor version evidence. Product records are separate from automatic dependency matching.
ggml-org · llama.cpp
Other versions: unaffected
| Version / range | Source status |
|---|---|
| b5899 to before b10261 | affected |
Original source 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.
References
- Patch github.com/ggml-org/llama.cpp/pull/25969
- Patch github.com/ggml-org/llama.cpp/pull/26511
- Patch github.com/ggml-org/llama.cpp/commit/cf06ad7dfe79e7bf2934150d4fefe1ce8db05490
- Source reference github.com/ggml-org/llama.cpp/blob/b10259/src/llama-vocab.cpp
- Release notes github.com/ggml-org/llama.cpp/releases/tag/b10261
- Security advisory www.vulncheck.com/advisories/llama-cpp-b5899-before-b10261-heap-out-of-bounds-write-via-plamo2-tokenizer