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.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| 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
| Product | Affected versions | Fixed 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
- Debian Security Tracker CVE-2025-52566 vendor-advisory
- https://github.com/ggml-org/llama.cpp/security/advisories/GHSA-7rxv-5jhh-j6xx exploit vendor-advisory
- https://github.com/ggml-org/llama.cpp/commit/dd6e6d0b6a4bbe3ebfc931d1eb14db2f2b1d70af patch
- Ubuntu CVE tracker vendor-advisory
- www.cve.org
- bugs.debian.org issue-tracking