p PatchFirst

CVE-2025-52566

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

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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.

CVSS 8.6 · High · EPSS 0.4% · Fix available

Published
Updated

Stack: system

Affected products and versions

  • llama.cpp

    Versions
    • < b5721: Affected

    No fix published

  • llama.cpp Debian:14

    Versions
    • 5151+dfsg-1~exp2
    • 5151+dfsg-1~exp3
    • 5318+dfsg-1
    • 5318+dfsg-2
    • 5713+dfsg-1
    Affected ranges
    • ECOSYSTEM: < 5760+dfsg-1

    Update to 5760+dfsg-1

  • llama.cpp Ubuntu:25.10

    Versions
    • 5318+dfsg-1
    • 5318+dfsg-2
    • 5713+dfsg-1
    • 5760+dfsg-1
    • 5760+dfsg-3
    • 5760+dfsg-4
    • 5882+dfsg-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • llama.cpp Ubuntu:26.10

    Versions
    • 8681+dfsg-1
    • 9721+dfsg-1ubuntu1
    • 10438+dfsg-1
    • 10438+dfsg-1ubuntu1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • llama.cpp Ubuntu:26.04:LTS

    Versions
    • 5882+dfsg-2
    • 8064+dfsg-1ubuntu1
    • 8681+dfsg-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →