CVE-2025-52566 - CVE House
Back to Database
Status published High CVE-2025-52566

llama.cpp tokenizer signed vs. unsigned heap overflow

Vulnerability 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.

Impact Analysis

Refer to official advisory for detailed impact metrics.

Remediation

Ensure systems are updated to the latest vendor-supplied patch levels.

THREAT MONITOR

Am I Vulnerable?

Launch our assessment wizard to check if your infrastructure is exposed to • CVE-2025-52566

Credits & Attribution

No credits recorded in the NVD database.

Affected Vendor

Affected Software

llama.cpp
Vulnerable Versions:
< b5721

Timeline

Official Publish: June 24th, 2025
Last Modified: June 24th, 2025
Added to House: July 22nd, 2026

CVSS Vectors

V3: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Weaknesses (CWE)