{"id":"CVE-2025-52566","aliases":["DEBIAN-CVE-2025-52566","EUVD-2025-19074","GHSA-7rxv-5jhh-j6xx","OESA-2025-2371","OESA-2025-2372","OESA-2025-2373","UBUNTU-CVE-2025-52566"],"status":"published","title":"llama.cpp tokenizer signed vs. unsigned heap 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.","severity":{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00363,"percentile":0.30574,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-119","CWE-195"],"published":"2025-06-24T03:21:19Z","modified":"2026-10-28T10:40:48Z","fixes":[{"ecosystem":"Debian:14","package":"llama.cpp","fixed_in":["5760+dfsg-1"],"sources":["osv"]},{"ecosystem":"openEuler:24.03-LTS-SP1","package":"llama.cpp","fixed_in":["20230815-5.oe2403sp1"],"sources":["osv"]},{"ecosystem":"openEuler:24.03-LTS-SP2","package":"llama.cpp","fixed_in":["20230815-5.oe2403sp2"],"sources":["osv"]},{"ecosystem":"openEuler:24.03-LTS","package":"llama.cpp","fixed_in":["20230815-5.oe2403"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:14","package":"llama.cpp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5760+dfsg-1"}]}],"versions":["5151+dfsg-1~exp2","5151+dfsg-1~exp3","5318+dfsg-1","5318+dfsg-2","5713+dfsg-1"]},{"source":"osv","ecosystem":"openEuler:24.03-LTS-SP1","package":"llama.cpp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"20230815-5.oe2403sp1"}]}]},{"source":"osv","ecosystem":"openEuler:24.03-LTS-SP2","package":"llama.cpp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"20230815-5.oe2403sp2"}]}]},{"source":"osv","ecosystem":"openEuler:24.03-LTS","package":"llama.cpp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"20230815-5.oe2403"}]}]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"llama.cpp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5318+dfsg-1","5318+dfsg-2","5713+dfsg-1","5760+dfsg-1","5760+dfsg-3","5760+dfsg-4","5882+dfsg-2"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"llama.cpp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8681+dfsg-1","9721+dfsg-1ubuntu1","10438+dfsg-1","10438+dfsg-1ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"llama.cpp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5882+dfsg-2","8064+dfsg-1ubuntu1","8681+dfsg-1"]}],"products":[{"vendor":"ggml","product":"llama.cpp"},{"vendor":"ggml-org","product":"llama.cpp"}],"references":[{"url":"https://github.com/ggml-org/llama.cpp/security/advisories/GHSA-7rxv-5jhh-j6xx","tags":["x_refsource_CONFIRM","exploit","Exploit","Vendor Advisory","advisory","report"]},{"url":"https://github.com/ggml-org/llama.cpp/commit/dd6e6d0b6a4bbe3ebfc931d1eb14db2f2b1d70af","tags":["x_refsource_MISC","Patch","fix","report"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/52xxx/CVE-2025-52566.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-52566","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2025-52566","tags":["advisory"]},{"url":"https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2025-2371","tags":["advisory"]},{"url":"https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2025-2372","tags":["advisory"]},{"url":"https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2025-2373","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2025-52566","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-52566","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2025-52566","title":"llama.cpp tokenizer signed vs. unsigned heap 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.","status":"published","published":"2025-06-24T03:21:19.009Z","modified":"2025-06-24T21:49:53.2Z","cvss":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-119","CWE-195"],"updated_at":"2026-11-02T14:32:31.309974Z"}],"euvd":[{"id":"EUVD-2025-19074","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.","status":"published","published":"2025-06-24T03:21:19Z","modified":"2025-06-24T21:49:53Z","cvss":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T20:32:16.964954Z"}],"nvd":[{"id":"CVE-2025-52566","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.","status":"published","published":"2025-06-24T04:15:46.967Z","modified":"2026-06-17T09:36:41.5Z","cvss":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"high","assessor":"secondary"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-119","CWE-195"],"updated_at":"2026-11-02T14:11:14.091082Z"}],"osv":[{"id":"CVE-2025-52566","title":"llama.cpp tokenizer signed vs. unsigned heap 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.","status":"published","published":"2025-06-24T03:21:19.009Z","modified":"2026-10-28T10:40:48.268833071Z","cvss":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-119","CWE-195"],"updated_at":"2026-11-02T15:44:50.45326Z"},{"id":"DEBIAN-CVE-2025-52566","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.","status":"published","published":"2025-06-24T04:15:46.967Z","modified":"2026-09-01T20:05:53.526948151Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:47.378563Z"},{"id":"OESA-2025-2371","title":"llama.cpp security update","description":"Security Fix(es):\n\nllama.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\u0026apos;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.(CVE-2025-52566)","status":"published","published":"2025-10-11T11:09:27Z","modified":"2026-08-18T01:19:12.686100991Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:52:44.957082Z"},{"id":"OESA-2025-2372","title":"llama.cpp security update","description":"Security Fix(es):\n\nllama.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\u0026apos;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.(CVE-2025-52566)","status":"published","published":"2025-10-11T11:09:27Z","modified":"2026-08-18T01:19:12.807680916Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:52:44.957082Z"},{"id":"OESA-2025-2373","title":"llama.cpp security update","description":"Security Fix(es):\n\nllama.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\u0026apos;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.(CVE-2025-52566)","status":"published","published":"2025-10-11T11:09:27Z","modified":"2026-08-18T01:19:12.358339119Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:52:44.957082Z"},{"id":"UBUNTU-CVE-2025-52566","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.","status":"published","published":"2025-06-24T04:15:00Z","modified":"2026-10-17T12:57:06.387706577Z","cvss":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","level":"high"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T16:55:50.31802Z"}]}}
