CVE-2025-52566: llama.cpp tokenizer signed vs. unsigned heap overflow
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 (llamavocab::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 Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2025-52566?
CVE-2025-52566 has a medium severity due to the potential for unintended behavior in token processing.
How do I fix CVE-2025-52566?
You can fix CVE-2025-52566 by upgrading to version b5721 or later of llama.cpp.
What components are affected by CVE-2025-52566?
CVE-2025-52566 affects the tokenizer implementation in llama.cpp prior to version b5721.
What type of vulnerability is CVE-2025-52566?
CVE-2025-52566 is a signed vs. unsigned integer overflow vulnerability in the tokenizer.
What issues can arise from CVE-2025-52566?
CVE-2025-52566 can lead to unintended behavior when handling token copying size comparisons.