Use After Free in Ggml Llama.cpp

CVE-2026-43632

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.

Vulnerability class: TOCTOU (Time-of-Check to Time-of-Use)

EPSS: 0.003 (26.3th percentile) — read the EPSS interpretation.

CVSS v3 metric

CVSS v3 base score 8.1 (High). Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.

Affected products

Weakness classification (CWE)

References

Frequently asked questions

What is CVE-2026-43632?
CVE-2026-43632 is a high-severity vulnerability in Ggml Llama.cpp, classified under Time-of-check Time-of-use (TOCTOU) Race Condition. CVSS score: 8.1/10. Published 2026-08-06.
How severe is CVE-2026-43632?
High severity. CVSS v3 base score is 8.1 out of 10.