CVE-2025-49847
highpriority · track · 0EPSS 0.005 · 44 %ileDEEUUSEPSS · scored 2026-10-27
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
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (5)
Products and version ranges known to be affected.
advisories (1)
Vendor and ecosystem advisories describing this.
- WID-SEC-W-2025-1747HCL DominoIQ (llama.cpp): Mehrere Schwachstellen ermöglichen CodeausführungDeutsch2025-08-07csaf · cert_bundDE
Ein entfernter, anonymer Angreifer kann mehrere Schwachstellen in HCL Domino ausnutzen, um beliebigen Programmcode auszuführen.
also known as (2)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (9)
External citations — patches, advisories, analysis.
- https://access.redhat.com/security/cve/cve-2025-49847cnnvd
- https://github.com/ggml-org/llama.cpp/commit/3cfbbdb44e08fd19429fed6cc85b982a91f0efd5cnnvd
- https://github.com/ggml-org/llama.cpp/releasesPatchcnnvd
- https://github.com/ggml-org/llama.cpp/security/advisories/GHSA-8wwf-w4qm-gpqrcnnvd
- https://nvd.nist.gov/vuln/detail/CVE-2025-49847cnnvd
- https://github.com/ggml-org/llama.cpp/commit/3cfbbdb44e08fd19429fed6cc85b982a91f0efd5enisa_euvd
- https://github.com/ggml-org/llama.cpp/security/advisories/GHSA-8wwf-w4qm-gpqrenisa_euvd
- https://github.com/ggml-org/llama.cpp/commit/3cfbbdb44e08fd19429fed6cc85b982a91f0efd5Patchnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan