8.6high
llama.cpp tokenizer signed vs. unsigned heap overflow
- Severity
- 8.6high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.38% (higher than 33% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
Description
llama.cpp is an inference of several LLM models in C/C++. Prior to version b5721, there is a signed vs. unsigned integer overflow in llama.cpp's tokenizer implementation (llama_vocab::tokenize) (src/llama-vocab.cpp:3036) resulting in unintended behavior in tokens copying size comparison. Allowing heap-overflowing llama.cpp inferencing engine with carefully manipulated text input during tokenization process. This issue has been patched in version b5721.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| ggml-org llama.cpp | < b5721 | CVE List |
| ggml llama.cpp | before b5721 | NVD |
All scores
| GitHub_M | 8.6high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Classification
What each source says
CVE List
llama.cpp is an inference of several LLM models in C/C++. Prior to version b5721, there is a signed vs. unsigned integer overflow in llama.cpp's tokenizer implementation (llama_vocab::tokenize) (src/llama-vocab.cpp:3036) resulting in unintended behavior in tokens copying size comparison. Allowing heap-overflowing llama.cpp inferencing engine with carefully manipulated text input during tokenization process. This issue has been patched in version b5721.
NVD (es)
llama.cpp es una inferencia de varios modelos LLM en C/C++. Antes de la versión b5721, se producía un desbordamiento de enteros con signo y sin signo en la implementación del tokenizador de llama.cpp (llama_vocab::tokenize) (src/llama-vocab.cpp:3036), lo que provocaba un comportamiento no deseado al comparar el tamaño de copia de tokens. Esto permitía el desbordamiento del montón del motor de inferencia de llama.cpp con una entrada de texto cuidadosamente manipulada durante el proceso de tokenización. Este problema se ha corregido en la versión b5721.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-52566 changed 2025-06-24 | CVE Terms of Use |
| NVD | CVE-2025-52566 changed 2026-06-17 | Public domain |