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

Published Jun 24, 2025
·
Updated

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 (llamavocab::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.

Affected Software

2 affected components
Llama llama.cpp<b5721
ggml llama.cpp<b5721

Event History

Jun 24, 2025
CVE Published
via MITRE·03:21 AM
Data Sourced
via MITRE·03:21 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-52566?

CVE-2025-52566 has a medium severity due to the potential for unintended behavior in token processing.

2

How do I fix CVE-2025-52566?

You can fix CVE-2025-52566 by upgrading to version b5721 or later of llama.cpp.

3

What components are affected by CVE-2025-52566?

CVE-2025-52566 affects the tokenizer implementation in llama.cpp prior to version b5721.

4

What type of vulnerability is CVE-2025-52566?

CVE-2025-52566 is a signed vs. unsigned integer overflow vulnerability in the tokenizer.

5

What issues can arise from CVE-2025-52566?

CVE-2025-52566 can lead to unintended behavior when handling token copying size comparisons.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203