CVE-2026-43632
ggml-org · llama.cpp
A use-after-free and TOCTOU race condition in llama.cpp tokenization endpoints may allow for memory corruption and potential remote code execution.
Executive summary
A high-severity memory corruption flaw in llama.cpp tokenization endpoints creates a risk of unauthorized code execution.
Vulnerability
The vulnerability involves a use-after-free defect and a time-of-check time-of-use (TOCTOU) race condition within the tokenization processing logic, which can be triggered by an unauthenticated attacker.
Business impact
The ability to trigger memory corruption can lead to the execution of arbitrary code, resulting in complete system compromise. With a CVSS score of 8.1, the risk to business operations and data security is substantial, especially in environments where the llama server handles untrusted user input.
Remediation
Immediate Action: Frequently check the official llama.cpp repository for security patches and apply updates immediately upon availability.
Proactive Monitoring: Monitor system performance and logs for errors related to tokenization or unexpected service interruptions, which could serve as indicators of exploitation.
Compensating Controls: Deploy a Web Application Firewall or similar filtering mechanism to sanitize inputs before they reach the tokenization endpoints.
Exploitation status
Public Exploit Available: Unknown.
Analyst recommendation
Security teams must treat this vulnerability with high urgency. Patching the software is the only definitive way to eliminate the underlying memory corruption risk, and until such time, network-level restrictions should be enforced to minimize exposure.