CVE-2026-43631

llama.cpp b7492–b9060 Use-After-Free RCE via llama-server

Published Aug 6, 2026 CVSS 4.0 · 9.2 Critical EPSS < 1% KEV · Not listed
Description
llama.cpp builds b7492 through the latest b9060 contains a use-after-free vulnerability in the vocab pointer of llama-server when the --sleep-idle-seconds feature is enabled, allowing unauthenticated remote attackers to execute arbitrary code. Attackers can trigger the vulnerability by sending requests to affected endpoints while the server transitions to sleep mode, causing concurrent worker threads to dereference a freed vocab pointer that can be reclaimed with attacker-controlled data to achieve remote code execution.

Analysis

AI-generated

Technical impact

A use‑after‑free flaw in the vocabulary pointer of llama‑server causes fetch requests to a running daemon to dereference freed memory once the server enters sleep mode via the --sleep‑idle‑seconds option. An unauthenticated network attacker can trigger the flaw by sending requests to affected endpoints; the concurrent worker threads then access attacker‑controlled data that replaces the freed pointer, resulting in arbitrary code execution on the host. The weakness is directly linked to CWE‑416, CWE‑362, and involves CWE‑825.

Affected Systems

The vulnerability affects the ggml‑org llama.cpp project in builds between commits b7492 and b9060. No specific release versions are enumerated in the advisory; the issue applies to any software compiled from the commit range that enables the sleep‑idle feature.

Risk and Exploitability

The CVSS score of 9.2 marks this as a critical flaw with high exploitation potential. EPSS score is 0.00412 (< 1%) and the issue is not listed in CISA KEV, but the lack of authentication requirement and the ability to exploit through normal HTTP endpoints make it highly practical. Attackers only need to point a request to a llama‑server instance running the vulnerable build with --sleep‑idle‑seconds enabled; no additional privileges or local access are required.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update llama.cpp to a release that contains the security fix for the use‑after‑free (see the GitHub security patch repository for the relevant commits).
  • If a quick update is impossible, disable the --sleep‑idle‑seconds feature to prevent the race condition that leads to the freed pointer dereference.
  • Restrict network access to the llama‑server endpoint to trusted IP ranges and monitor for anomalous requests until the patch can be applied.

Generated by OpenCVE AI on August 13, 2026 at 10:42 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Ggml
Ggml llama.cpp
CPEs cpe:2.3:a:ggml:llama.cpp:*:*:*:*:*:*:*:*
Vendors & Products Ggml
Ggml llama.cpp
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Ggml-org
Ggml-org llama.cpp
Vendors & Products Ggml-org
Ggml-org llama.cpp
Type Values Removed Values Added
Description llama.cpp builds b7492 through the latest b9060 contains a use-after-free vulnerability in the vocab pointer of llama-server when the --sleep-idle-seconds feature is enabled, allowing unauthenticated remote attackers to execute arbitrary code. Attackers can trigger the vulnerability by sending requests to affected endpoints while the server transitions to sleep mode, causing concurrent worker threads to dereference a freed vocab pointer that can be reclaimed with attacker-controlled data to achieve remote code execution.
Title llama.cpp b7492–b9060 Use-After-Free RCE via llama-server
Weaknesses CWE-362
CWE-416
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 9.2, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

  • CWE-416

    Use After Free

  • CWE-825

    Expired Pointer Dereference

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Aug 14, 2026, 4:49 PM
Reserved
May 1, 2026, 6:22 PM
Status
Analyzed
Published
Aug 6, 2026, 10:17 PM
Modified
Oct 23, 2026, 9:10 PM
Severity
Important
Public date
Aug 6, 2026, 3:52 PM