CVE-2025-52566CWE-119CWE-195

llama.cpp tokenizer signed vs. unsigned heap overflow

High · published June 24, 2025

CVSS v3.1
8.6
EPSS
0%
Percentile
29.0
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
8.6 · HIGH
Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00363 · 29.0th percentile
Weaknesses
CWE-119 · Improper Restriction of Operations within the Bounds of a Memory Buffer; CWE-195 · Signed to Unsigned Conversion Error
Published
2025-06-24T03:21Z
EPSS history
Timeline
  • 24 JUN 03:21Z
    llama.cpp tokenizer signed vs. unsigned heap overflow
    cvelistv5