CVE-2026-39909
Received Received - Intake

Use-After-Free in llama.cpp RPC Server GRAPH_RECOMPUTE Handler

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

Publication date: 2026-08-21

Last updated on: 2026-08-21

Assigner: VulnCheck

Description

llama.cpp before b8585 contains a use-after-free vulnerability in the RPC server's GRAPH_RECOMPUTE handler that allows unauthenticated remote attackers to achieve arbitrary read and write access by storing a computation graph, freeing referenced buffers, and reclaiming freed memory with attacker-controlled content. Attackers can send RPC requests to trigger re-execution of stored graphs with dangling pointers, enabling full remote code execution without requiring authentication or user interaction.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

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

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
ggml-org llama.cpp to b8585 (inc)

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 is a use-after-free vulnerability in the RPC server's GRAPH_RECOMPUTE handler of llama.cpp before version b8585. Attackers can exploit stored computation graphs with dangling pointers to free referenced buffers and reclaim memory with attacker-controlled content. This enables full remote code execution without authentication or user interaction.

Detection Guidance

Detecting this vulnerability requires checking the version of llama.cpp running on your system. The vulnerable version is before b8585. Run 'llama-server --version' or check the commit hash in your installation directory to verify if you are affected.

Impact Analysis

An attacker could remotely execute arbitrary code on your system running a vulnerable version of llama.cpp. This could lead to data theft, system compromise, or denial of service. The high CVSS score of 9.2 indicates severe impact.

Compliance Impact

This vulnerability could lead to unauthorized data access or exfiltration, violating GDPR's data protection requirements and HIPAA's security rules for protected health information. Organizations may face compliance violations and legal penalties if exploited.

Mitigation Strategies

Immediately update llama.cpp to version b8585 or later. This can be done by pulling the latest changes from the official repository or downloading the patched release from the GitHub releases page.

Chat Assistant

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

EPSS Chart