cve.bz

CVE-2026-43632 ggml llama.cpp: Use After Free

9.2 criticalEPSS 0.5%Fix available

Critical (9.2) in ggml llama.cpp. EPSS 0.5% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 4.0

9.2 critical
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

CVSS 3.1

8.1 high
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
0.5% (unchanged from 0.5% a week ago; 0.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 42nd percentile. Scored 2026-11-17. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-08-08. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition
CWE-416 Use After Free
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-43632 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-43632?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-43632?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-43632 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
ggml-org llama.cppfrom b7492 through b9060

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian14llama.cppno fix listedDEBIAN-CVE-2026-43632
Ubuntu26.04:LTS, 26.10llama.cppno fix listedUBUNTU-CVE-2026-43632

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Important.

Red Hat's statement

A use-after-free vulnerability was discovered in the llama-server component of llama.cpp. The flaw exists across six tokenization endpoints (/tokenize, /detokenize, /infill, /apply-template, /rerank, and /anthropic/count_tokens) that bypass the main task queue and access ctx_server.vocab directly on worker threads. When the service is configured with the --sleep-idle-seconds option, an unauthenticated remote attacker can exploit a time-of-check-to-time-of-use (TOCTOU) race condition. This occurs when the main thread releases synchronization locks and destroys the vocabulary structure while an HTTP worker thread is still actively processing a request.

An unauthenticated remote attacker sending concurrent HTTP requests can trigger heap corruption, leading to a service crash (Denial of Service) or potential arbitrary code execution within the security context of the llama-server process. Because exploitation relies on tight timing windows during idle cleanup cycles and impact is contained within the process boundaries without inherent host privilege escalation or OS isolation bypass, this vulnerability has been rated with an Important severity. Due to these reasons, this vulnerability has been rated with an Important severity.

Red Hat's mitigation

To mitigate this issue, avoid configuring the `llama-server` with the `--sleep-idle-seconds` option. Disabling this option prevents the specific race condition that leads to the use-after-free vulnerability. If `llama-server` is running as a service, a restart of the service will be required for the change to take effect.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-43632.

Attack patterns (CAPEC)

  • CAPEC-27 Leveraging Race Conditions via Symbolic Links Likelihood: Medium · Severity: High
  • CAPEC-29 Leveraging Time-of-Check and Time-of-Use (TOCTOU) Race Conditions Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON