Skip to content
HighVulnerabilityLLM-specific

CVE-2025-52566: llama.cpp heap overflow via crafted text input during tokenization

Identifier
CVE-2025-52566
Published
Record updated
View JSON
Fixed in
The source references a patch, a mitigation or a vendor advisory.
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.4%Estimated probability that this CVE is exploited in the next 30 days, from the FIRST Exploit Prediction Scoring System. Read on .

Summary

llama.cpp versions prior to b5721 contain a signed versus unsigned integer overflow in the tokenizer implementation (llama_vocab::tokenize, src/llama-vocab.cpp:3036). The overflow causes unintended behavior in a token copying size comparison. Carefully manipulated text input processed during tokenization can overflow the heap in the inference engine.

Mitigation

This issue has been patched in version b5721.