{"id":"CVE-2025-52566","published":"2025-06-24T03:21:19Z","modified":"2025-06-24T21:49:53Z","title":"llama.cpp tokenizer signed vs. unsigned heap overflow","vendor":"ggml-org","product":"llama.cpp","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.6,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00581,"percentile":0.41713,"provenance":"source"},"cwes":[{"id":"CWE-119","name":"Improper Restriction of Operations within the Bounds of a Memory Buffer"},{"id":"CWE-195","name":"Signed to Unsigned Conversion Error"}],"references":[{"url":"https://github.com/ggml-org/llama.cpp/security/advisories/GHSA-7rxv-5jhh-j6xx","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/ggml-org/llama.cpp/commit/dd6e6d0b6a4bbe3ebfc931d1eb14db2f2b1d70af","tags":["x_refsource_MISC"]}],"priority":{"score":14.4,"factors":[{"name":"EPSS percentile","points":8.34},{"name":"CVSS severity","points":6.02}]},"vendorSlug":"ggml-org","affectedVersions":[{"vendor":"ggml-org","product":"llama.cpp","versions":["< b5721"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2025-06-24T21:49:17.452816Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2025-19074","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-ggml-org-llama-cpp-cve-2025-52566","children":[{"from":"CVE-2025-52566","to":"CVE-2024-58400","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["common/common.cpp"],"commits":["https://github.com/ggml-org/llama.cpp/commit/faf69d4237c9ae4d7f572b4674d1002463e8acd3","https://github.com/ggml-org/llama.cpp/commit/eae597182cb61bbde0b26e7cec5999d28b9327fe","https://github.com/ggml-org/llama.cpp/commit/dd6e6d0b6a4bbe3ebfc931d1eb14db2f2b1d70af"],"basis":"rarely changed file"}]}]}}