8.8

CVE-2025-49847: llama.cpp Vulnerable to Buffer Overflow via Malicious GGUF Model

Analyzed
AliasesUBUNTU-CVE-2025-49847DEBIAN-CVE-2025-49847openSUSE-SU-2025:15245-1
Published 17-06-2025Last modified 18-06-2025

Vulnerability summary

CVE-2025-49847 is a high (CVSS 8.8) vulnerability in ggml-org llama.cpp. EPSS estimates a 0.55% chance of exploitation in the next 30 days, higher than 47% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 8.8, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
8.8/10
010
High · v3.1 (CVE.org)
EPSS score
0.55%
0%100%
Low · +0.04 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Timeline

  1. 17-06-2025
    PublishedVulnerability first disclosed.
  2. 18-06-2025
    Last modifiedVulnerability information updated.

Description

llama.cpp is an inference of several LLM models in C/C++. Prior to version b5662, an attacker‐supplied GGUF model vocabulary can trigger a buffer overflow in llama.cpp’s vocabulary‐loading code. Specifically, the helper _try_copy in llama.cpp/src/vocab.cpp: llama_vocab::impl::token_to_piece() casts a very large size_t token length into an int32_t, causing the length check (if (length < (int32_t)size)) to be bypassed. As a result, memcpy is still called with that oversized size, letting a malicious model overwrite memory beyond the intended buffer. This can lead to arbitrary memory corruption and potential code execution. This issue has been patched in version b5662.

CVSS metrics

4 scores · 4 sources · 1 version

EPSS trend

Probability

0.55%

Chance of exploitation in the next 30 days

Percentile

47%

Versus all other CVEs

30-day change

Increase +0.04 pp

From 0.52% on 21-10-2026

21-10-202620-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.

Debian1 product
  • llama.cpp< 5713+dfsg-1
Ggml1 product
Ggml-org1 product
Opensuse1 product
  • llamacpp&distro=openSUSE Tumbleweed< 5699-1.1
Ubuntu1 product
  • llama.cppAll versions (No fix recorded)

5 vendors · 5 products

References

6 links