CVE-2026-43632

llama.cpp b7492–b9060 Use-After-Free in Tokenization Endpoints

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 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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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 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 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'}

Weaknesses
  • CWE-364

    Signal Handler Race Condition

  • CWE-367

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

  • CWE-416

    Use After Free

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:53 PM