CVE-2026-43631: llama.cpp b7492–b9060 Use-After-Free RCE via llama-server
llama.cpp builds b7492 through the latest b9060 contains a use-after-free vulnerability in the vocab pointer of llama-server when the --sleep-idle-seconds feature is enabled, allowing unauthenticated remote attackers to execute arbitrary code. Attackers can trigger the vulnerability by sending requests to affected endpoints while the server transitions to sleep mode, causing concurrent worker threads to dereference a freed vocab pointer that can be reclaimed with attacker-controlled data to achieve remote code execution.
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 - Configuration
Disable the --sleep-idle-seconds feature in llama-server to prevent the use-after-free in the vocab pointer during server sleep mode.
llama.cpp llama-server (--sleep-idle-seconds) --sleep-idle-seconds = disabled
Event History
Frequently Asked Questions
What is the severity of CVE-2026-43631?
The severity of CVE-2026-43631 is rated as high with a score of 8.1.
How do I fix CVE-2026-43631?
To fix CVE-2026-43631, update to a version of llama.cpp that includes patches for the use-after-free vulnerability.
What is the impact of CVE-2026-43631?
CVE-2026-43631 allows unauthenticated remote attackers to execute arbitrary code on affected systems.
Which versions of llama.cpp are affected by CVE-2026-43631?
CVE-2026-43631 affects llama.cpp builds from b7492 through the latest b9060.
What feature must be enabled to exploit CVE-2026-43631?
The --sleep-idle-seconds feature must be enabled for the use-after-free vulnerability in CVE-2026-43631 to be exploited.