CVE-2025-52566
JSON

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 packageVersionsReported by
ggml-org llama.cpp< b5721CVE List
ggml llama.cppbefore b5721NVD

All scores

GitHub_M8.6high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Classification

CWE-119CWE-195

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

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

SourceRecordLicence
CVE ListCVE-2025-52566 changed 2025-06-24CVE Terms of Use
NVDCVE-2025-52566 changed 2026-06-17Public domain