Skip to content

CVE-2025-52566 llama.cpp tokenizer signed vs. unsigned heap overflow

HighCVSS 8.8 EPSS 0.38%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: no · technical impact: total
Technology
UbuntuDebian

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.

Upgrade path

5 packages: 2 fixed, 2 with no fix yet.

PackageAffectedFixed inStatus
ubuntu/llama.cpp(Ubuntu 26.04) All versions No fix listed No fix yet
ubuntu/llama.cpp(Ubuntu 26.10) All versions No fix listed No fix yet
debian/llama.cpp(Debian 14) < 5760+dfsg-1; = 5151+dfsg-1~exp2; = 5151+dfsg-1~exp3; = 5318+dfsg-1 +2 more 5760+dfsg-1 Fixed
ggml llama.cpp < b5721 b5721 Fixed
ggml-org llama.cpp = < b5721 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
debian/llama.cpp(Debian:14) < 5760+dfsg-1 5760+dfsg-1
debian/llama.cpp(Debian:14) = 5151+dfsg-1~exp2 No fix listed
debian/llama.cpp(Debian:14) = 5151+dfsg-1~exp3 No fix listed
debian/llama.cpp(Debian:14) = 5318+dfsg-1 No fix listed
debian/llama.cpp(Debian:14) = 5318+dfsg-2 No fix listed
debian/llama.cpp(Debian:14) = 5713+dfsg-1 No fix listed
ggml-org llama.cpp = < b5721 No fix listed
ubuntu/llama.cpp(Ubuntu:26.04) All versions No fix listed
ggml llama.cpp < b5721 b5721
ubuntu/llama.cpp(Ubuntu:26.10) All versions No fix listed

References