---
cve: "CVE-2025-49847"
severity: "HIGH"
cvss: 8.8
epss: "0.5%"
vendor: "ggml-org"
kev: false
exploited: false
published: "2025-06-17 20:15:32"
tags: [cve, security, high]
source: tsecurity.de CVE-Dossier
exported: "2026-09-20T20:04:40+02:00"
---

# CVE-2025-49847

> 8.8 HIGH · 🧪 PoC

## Beschreibung

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-Vektor

```
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
```

| Metrik | Wert | Bewertung |
|---|---|---|
| AV Angriffsvektor | Netzwerk | bad |
| AC Komplexität | Gering | bad |
| PR Privilegien | Keine | bad |
| UI Interaktion | Erforderlich | good |
| S Scope | Unverändert | good |
| C Vertraulichkeit | Hoch | bad |
| I Integrität | Hoch | bad |
| A Verfügbarkeit | Hoch | bad |

## Patch verfügbar (OSV)

- fb85a288d72abbd5e5daa8de96e6f8bfa7b5ab46 (Commit)
- 3cfbbdb44e08fd19429fed6cc85b982a91f0efd5 (Commit)

## Referenzen

- <https://github.com/ggml-org/llama.cpp/security/advisories/GHSA-8wwf-w4qm-gpqr>
- <https://github.com/ggml-org/llama.cpp/commit/3cfbbdb44e08fd19429fed6cc85b982a91f0efd5>

---
_Exportiert aus dem [tsecurity.de CVE-Dossier](https://tsecurity.de/cve?cve=CVE-2025-49847) · Datenquellen: EUVD (ENISA), NVD, OSV, CISA KEV, FIRST EPSS, Exploit-DB, BSI BITS_
