CVE-2026-43632
Received Received - Intake

Use-After-Free in llama.cpp Server Tokenization Endpoints

Vulnerability report for CVE-2026-43632, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-06

Last updated on: 2026-08-06

Assigner: VulnCheck

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-06
Last Modified
2026-08-06
Generated
2026-08-07
AI Q&A
2026-08-07
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
llama_cpp llama_cpp From b7492 (inc) to b9060 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-367 The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.
CWE-416 The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

llama.cpp versions b7492 to b9060 have a use-after-free vulnerability in llama-server. It affects 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 exploit a time-of-check-time-of-use race condition where the main thread frees vocab after releasing a lock but before HTTP handlers finish using it, causing crashes or potential code execution when --sleep-idle-seconds is set.

Impact Analysis

This vulnerability can cause application crashes due to memory corruption when the freed memory is accessed. In some cases, it may allow arbitrary code execution if an attacker crafts specific inputs to exploit the race condition. Systems using vulnerable llama.cpp versions with exposed tokenization endpoints are at risk.

Compliance Impact

This vulnerability could potentially impact compliance with GDPR and HIPAA by enabling unauthorized access or manipulation of data processed by the affected llama-server endpoints. A use-after-free flaw may lead to crashes or code execution, risking data integrity and confidentiality. However, specific compliance impacts depend on deployment context and mitigations in place.

Mitigation Strategies

Update llama.cpp to a version beyond b9060 to address the use-after-free vulnerability in the tokenization endpoints. Avoid using --sleep-idle-seconds configuration until patched.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-43632. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart