CVE-2026-43632: llama.cpp b7492–b9060 Use-After-Free in Tokenization Endpoints
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/counttokens) that bypass the task queue and access ctxserver.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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
llama.cppto a version that resolves this vulnerability.Fixed in b9060 - Compensating control
If --sleep-idle-seconds is configured, mitigate the use-after-free by disabling tokenization endpoints (/tokenize, /detokenize, /infill, /apply-template, /rerank, /anthropic/count_tokens) or routing them through the task queue until llama.cpp is upgraded beyond b9060 (vulnerability applies to builds b7492–b9060).
Event History
Frequently Asked Questions
What is the severity of CVE-2026-43632?
CVE-2026-43632 has a severity rating of 8.1, indicating it is a high risk vulnerability.
What does CVE-2026-43632 affect?
CVE-2026-43632 affects the llama-server included in llama.cpp versions b7492 through b9060.
How do I fix CVE-2026-43632?
To fix CVE-2026-43632, update llama.cpp to a version that has addressed this use-after-free vulnerability.
What are the impacted endpoints in CVE-2026-43632?
CVE-2026-43632 impacts six tokenization endpoints: /tokenize, /detokenize, /infill, /apply-template, /rerank, and /anthropic/count_tokens.
What type of vulnerability is CVE-2026-43632 classified as?
CVE-2026-43632 is classified as a Use After Free vulnerability, also associated with race condition issues.