Description
llama.cpp builds b7492 through the latest b9060 contains a use-after-free vulnerability in llama-server affecting six tokenization endpoints (/tokenize, /detokenize, /infill, /apply-template, /rerank, and /anthropic/count_tokens) that bypass the task queue and access ctx_server.vocab directly on HTTP worker threads. Attackers can exploit a time-of-check-time-of-use race condition where the main thread destroys and frees vocab after the synchronization lock is released but before the handler finishes using it, causing a crash or potential code execution when --sleep-idle-seconds is configured.
Published: 2026-08-06
Score: 9.2 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability is a use‑after‑free error located in the llama‑server used by llama.cpp between builds b7492 and b9060. A time‑of‑check/time‑of‑use race allows the main thread to delete the vocabulary shared by the server while an HTTP worker thread is still processing a request, which can cause a crash or, if the coroutine is scheduled to run idle operations, may lead to arbitrary code execution.

Affected Systems

The affected product is llama.cpp from the ggml‑org project. All builds between b7492 and the latest b9060 are impacted, and the flaw is present in six tokenization endpoints: /tokenize, /detokenize, /infill, /apply-template, /rerank, and /anthropic/count_tokens.

Risk and Exploitability

The risk is quantified by a CVSS score of 9.2, indicating high severity. The EPSS score of 0.0033 (< 1%) suggests a very low probability of exploitation, and the vulnerability is not listed in the CISA KEV catalog, so there is no evidence of active exploitation. Attackers can remotely trigger the flaw by issuing HTTP requests to any of the six endpoints while the server is configured with --sleep-idle-seconds, enabling the main thread to free the vocabulary during the request’s processing. This race can result in a service denial or, in certain conditions, local code execution on the host.

Generated by OpenCVE AI on August 13, 2026 at 14:56 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the security patch available at https://github.com/Vladimir-tokarev-cyera/llama-cpp-security-patches
  • Disable or remove the --sleep-idle-seconds configuration to prevent the vocabulary from being freed while idle
  • Restrict access to the tokenization endpoints to trusted users or networks, and monitor for anomalous requests or crashes

Generated by OpenCVE AI on August 13, 2026 at 14:56 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 14 Aug 2026 17:15:00 +0000

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

Thu, 13 Aug 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-364
References
Metrics threat_severity

None

threat_severity

Important


Sat, 08 Aug 2026 02:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Fri, 07 Aug 2026 19:15:00 +0000


Fri, 07 Aug 2026 02:15:00 +0000

Type Values Removed Values Added
First Time appeared Ggml-org
Ggml-org llama.cpp
Vendors & Products Ggml-org
Ggml-org llama.cpp

Thu, 06 Aug 2026 22:15:00 +0000

Type Values Removed Values Added
Description llama.cpp builds b7492 through the latest b9060 contains a use-after-free vulnerability in llama-server affecting six tokenization endpoints (/tokenize, /detokenize, /infill, /apply-template, /rerank, and /anthropic/count_tokens) that bypass the task queue and access ctx_server.vocab directly on HTTP worker threads. Attackers can exploit a time-of-check-time-of-use race condition where the main thread destroys and frees vocab after the synchronization lock is released but before the handler finishes using it, causing a crash or potential code execution when --sleep-idle-seconds is configured.
Title llama.cpp b7492–b9060 Use-After-Free in Tokenization Endpoints
Weaknesses CWE-367
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'}


Subscriptions

Ggml Llama.cpp
Ggml-org Llama.cpp
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-14T16:49:56.563Z

Reserved: 2026-05-01T18:22:45.641Z

Link: CVE-2026-43632

cve-icon Vulnrichment

Updated: 2026-08-08T02:09:14.121Z

cve-icon NVD

Status : Received

Published: 2026-08-06T22:17:06.343

Modified: 2026-08-08T02:17:17.033

Link: CVE-2026-43632

cve-icon Redhat

Severity : Important

Publid Date: 2026-08-06T15:53:19Z

Links: CVE-2026-43632 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-13T15:00:04Z

Weaknesses
  • CWE-364

    Signal Handler Race Condition

  • CWE-367

    Time-of-check Time-of-use (TOCTOU) Race Condition

  • CWE-416

    Use After Free