CVE-2025-52566: llama.cpp - Integer Overflow
- Cve: CVE-2025-52566
- Name: llama.cpp - Integer Overflow
- 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: Attackers can cause heap overflow, potentially leading to application crashes or arbitrary code execution.
- Remediation: Update to version b5721 or later.
- Vulnerability type: integer_overflow
- Vulnerability impact: denial_of_service, remote_code_execution
- Requirement type: none
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 8.8
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Epss score: 0.00379
- Epss percentile: 0.32323
- Assignee: [email protected]
- Published at: 2025-06-24T04:15:46Z
- Age in days: 518
- Modified at: 2026-06-17T09:36:41Z
- Patch available: yes
- Public exploits total: 1
- References total: 2
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2025-52566
- Nvd status: analyzed
- Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-119 | Improper Restriction of Operations within the Bounds of a Memory Buffer |
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://github.com/ggml-org/llama.cpp/security/advisories/GHSA-7rxv-5jhh-j6xx | nvd | 2025-06-24 |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/ggml-org/llama.cpp/commit/dd6e6d0b6a4bbe3ebfc931d1eb14db2f2b1d70af | nvd | Patch |
| https://github.com/ggml-org/llama.cpp/security/advisories/GHSA-7rxv-5jhh-j6xx | nvd | Exploit, Vendor Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| ggml:llama.cpp | < b5721 | no | nvd | /v1/products/ggml/llama.cpp |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| ggml-org/llama.cpp | commit, fix, security_advisory | yes | /v1/repositories/ggml-org/llama.cpp |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Public exploit: yes
- Public exploit count: 1
- Public exploit first date: 2025-06-24
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts