CVE-2026-39909: llama.cpp Use-After-Free in RPC GRAPH_RECOMPUTE Handler
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.
Security readout for executives and security teams
Plain-English summary
A memory-safety flaw in llama.cpp’s RPC server can let an unauthenticated remote attacker take control of a vulnerable server. Successful exploitation could expose data, alter processing, disrupt service, or run attacker-controlled code. The issue affects builds before b8585 when the RPC service is reachable.
Executive priority
Prioritize immediate remediation for internet-facing or broadly reachable RPC servers. Schedule rapid inventory and patching elsewhere because successful exploitation could compromise confidentiality, integrity, and availability without credentials or user action. Isolation reduces exposure but should not replace upgrading.
Technical view
CVE-2026-39909 is a CWE-416 use-after-free in the RPC GRAPH_RECOMPUTE handler. Stored computation graphs can retain dangling buffer references, enabling arbitrary memory reads and writes and potentially remote code execution. CVSS 4.0 rates it 9.2 critical, with network access, no privileges, no user interaction, and high attack complexity.
Likely exposure
Exposure is concentrated in llama.cpp deployments running builds before b8585 with the RPC server enabled and reachable from untrusted networks. Non-RPC deployments or strongly isolated RPC services are less exposed. The supplied record does not provide complete package-version mappings or confirm whether RPC is enabled by default.
Exploitation context
The supplied sources describe a remotely exploitable, unauthenticated path to code execution, but the CVSS vector marks attack complexity high. The CVE is not listed as KEV in the bundle, and no cited source establishes active exploitation. Treat exposed systems urgently without claiming attacks are occurring.
Researcher notes
Primary references identify a patch commit, pull request, and b8585 release. The vulnerable boundary is described as builds before b8585, although the structured affected-version entry is incomplete. Validate exposure through build provenance and RPC configuration. No supplied evidence supports active exploitation, public weaponization, or compromise attribution.
Mitigation direction
Upgrade llama.cpp to release b8585 or a later vendor-supported build.
Apply the referenced patch if an immediate full upgrade is not feasible.
Until updated, disable the RPC server where operationally possible.
Restrict RPC network access to explicitly trusted systems and management paths.
Validation and detection
Inventory llama.cpp builds and identify every version earlier than b8585.
Confirm whether each deployment enables the RPC server.
Verify RPC endpoints are not reachable from untrusted networks.
Confirm the upgrade or referenced patch is present in deployed binaries.
Review RPC service logs for unexpected requests or abnormal crashes.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-416: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
3Timeline events
1ADP providers
5Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-416 · source CWE mapping
Use After Free
Use After Free represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.