ggml-org llama.cpp llama.cpp/src/vocab.cpp token_to_piece memory corruption

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
7.9$0-$5k0.00

Summaryinfo

A vulnerability categorized as critical has been discovered in ggml-org llama.cpp. This vulnerability affects the function llama_vocab::impl::token_to_piece of the file llama.cpp/src/vocab.cpp. The manipulation results in memory corruption. This vulnerability is known as CVE-2025-49847. It is possible to launch the attack remotely. No exploit is available. A patch should be applied to remediate this issue.

Detailsinfo

A vulnerability was found in ggml-org llama.cpp (affected version unknown). It has been classified as critical. Affected is the function llama_vocab::impl::token_to_piece of the file llama.cpp/src/vocab.cpp. The manipulation with an unknown input leads to a memory corruption vulnerability. CWE is classifying the issue as CWE-119. The product performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. This is going to have an impact on confidentiality, integrity, and availability. CVE summarizes:

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.

The advisory is available at github.com. This vulnerability is traded as CVE-2025-49847 since 06/11/2025. The exploitability is told to be easy. It is possible to launch the attack remotely. The exploitation doesn't require any form of authentication. Technical details are known, but there is no available exploit.

Applying the patch 3cfbbdb44e08fd19429fed6cc85b982a91f0efd5 is able to eliminate this problem. The bugfix is ready for download at github.com.

The vulnerability is also documented in the vulnerability database at CERT Bund (WID-SEC-2025-1747). If you want to get best quality of vulnerability data, you may have to visit VulDB.

Affected

  • HCL Domino

Productinfo

Vendor

Name

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 8.0
VulDB Meta Temp Score: 7.9

VulDB Base Score: 7.3
VulDB Temp Score: 7.0
VulDB Vector: 🔒
VulDB Reliability: 🔍

CNA Base Score: 8.8
CNA Vector (GitHub_M): 🔒

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Memory corruption
CWE: CWE-119
CAPEC: 🔒
ATT&CK: 🔒

Physical: No
Local: No
Remote: Yes

Availability: 🔒
Status: Not defined

EPSS Score: 🔒
EPSS Percentile: 🔒

Price Prediction: 🔍
Current Price Estimation: 🔒

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Patch
Status: 🔍

0-Day Time: 🔒

Patch: 3cfbbdb44e08fd19429fed6cc85b982a91f0efd5

Timelineinfo

06/11/2025 CVE reserved
06/18/2025 +7 days Advisory disclosed
06/18/2025 +0 days VulDB entry created
08/27/2025 +70 days VulDB entry last update

Sourcesinfo

Product: github.com

Advisory: GHSA-8wwf-w4qm-gpqr
Status: Confirmed

CVE: CVE-2025-49847 (🔒)
GCVE (CVE): GCVE-0-2025-49847
GCVE (VulDB): GCVE-100-312810
CERT Bund: WID-SEC-2025-1747 - HCL DominoIQ (llama.cpp): Mehrere Schwachstellen erm&ouml;glichen Codeausf&uuml;hrung

Entryinfo

Created: 06/18/2025 08:00
Updated: 08/27/2025 16:25
Changes: 06/18/2025 08:00 (66), 08/08/2025 13:38 (7), 08/27/2025 16:25 (1)
Complete: 🔍
Cache ID: 216::103

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!