CVE-2026-43632 Details
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.
A use-after-free vulnerability has been identified in llama.cpp versions b7492 through b9060, specifically within the llama-server component. This vulnerability affects six tokenization endpoints—/tokenize, /detokenize, /infill, /apply-template, /rerank, and /anthropic/count_tokens. The issue arises from a time-of-check-time-of-use race condition, where the main thread frees the vocabulary resource after releasing the synchronization lock but before the endpoint handler has completed its processing. This flaw can lead to a crash or potentially allow for code execution, particularly when the --sleep-idle-seconds option is active.
Users can apply the available patch for this vulnerability, which is included in the 'llama.cpp Security Patches' repository. Instructions for applying the patch are provided in the repository.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Aug 8, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/Vladimir-tokarev-cyera/llama-cpp-security-patches | [email protected] | PatchThird Party Advisory |
| https://www.vulncheck.com/advisories/llama-cpp-b7492-b9060-use-after-free-in-tokenization-endpoints | [email protected] | PatchThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-367 | Time-of-check Time-of-use (TOCTOU) Race Condition | [email protected] |
| CWE-416 | Use After Free | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| ggml llama.cpp | >= b7492, <= b9060 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Sep 21, 2026 | Initial Analysis | [email protected] |
| Aug 8, 2026 | CVE Modified | CISA-ADP |
| Aug 7, 2026 | CVE Modified | [email protected] |
| Aug 6, 2026 | New CVE Received | [email protected] |