CVE-2026-107183
Awaiting Analysis Awaiting Analysis - Queue

Heap Corruption in llama.cpp via Tool-ID Exploitation

Vulnerability report for CVE-2026-107183, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-07

Last updated on: 2026-10-07

Assigner: VulnCheck

Description

llama.cpp before b11393 contains a use-after-free and double free vulnerability in common_chat_peg_mapper::map that allows unauthenticated remote attackers to corrupt heap memory via a dangling current_tool pointer. Attackers can submit a chat_parser in a POST /completion request emitting a tool-id after a tool-close tag to crash llama-server and shape a heap write primitive.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-07
Last Modified
2026-10-07
Generated
2026-10-07
AI Q&A
2026-10-07
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
ggml-org llama.cpp b8227

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-416 The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is a use-after-free and double free issue in the llama.cpp library before version b11393. It occurs in the common_chat_peg_mapper::map function when a dangling current_tool pointer references freed memory. Attackers can exploit this by sending a crafted POST /completion request with a tool-id after a tool-close tag, causing the server to crash and enabling heap memory corruption.

Detection Guidance

Detecting this vulnerability requires checking the version of llama.cpp in use. Run `llama-server --version` or inspect the commit hash in the repository. Versions before b11393 are vulnerable. Monitor logs for crashes in llama-server, particularly after POST /completion requests with malformed chat_parser inputs.

Impact Analysis

This vulnerability allows unauthenticated remote attackers to corrupt heap memory, potentially crashing the llama-server process. In severe cases, it could enable a heap write primitive, leading to remote code execution (RCE) when combined with other vulnerabilities. Systems using vulnerable versions of llama.cpp for LLM inference are at risk.

Compliance Impact

This vulnerability could lead to unauthorized memory corruption and potential remote code execution, which may result in data breaches or unauthorized access to sensitive information. Such incidents could violate GDPR's data protection requirements and HIPAA's safeguards for protected health information, depending on the data processed by the affected system.

Mitigation Strategies

Upgrade to llama.cpp version b11393 or later immediately. If upgrading is not possible, disable the /completion endpoint or restrict access to trusted clients. Apply the patch from commit dbe4c3e manually if an official update is unavailable.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-107183. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart