CVE-2026-43630
Description
A flaw was found in llama.cpp. This out-of-bounds read vulnerability in the recurrent memory state restore path allows attackers with write access to the slot save directory to read memory beyond its allocated boundary. By crafting a malicious slot file with an oversized sequence identifier (seq_id) value, an attacker can trigger this flaw, leading to the leakage of heap data, including pointer values, into server logs. This information disclosure can defeat Address Space Layout Randomization (ASLR) protections and facilitate further exploitation.
Statement
Exploitation requires local write access to the slot storage directory to introduce crafted state files prior to a restoration operation. The impact is strictly bounded to low confidentiality loss from heap memory leakage into application logs and low availability impact from potential process crashes (C:L, I:N, A:L), with zero impact on data or system integrity. Deployments enforcing write-restricted filesystem permissions on session state directories or running purely stateless inference workloads are completely unaffected.
Mitigation
Restrict write access to the llama.cpp slot save directory. Ensure that only authorized users or processes have write permissions to this directory. If the recurrent memory state feature is not in use, ensure the slot save directory is either removed or configured with highly restrictive permissions to prevent the placement of malicious files.
Understanding the Weakness (CWE)
Confidentiality
Technical Impact: Read Memory
An attacker could get secret values such as cryptographic keys, PII, memory addresses, or other information that could be used in additional attacks.
Confidentiality
Technical Impact: Bypass Protection Mechanism
Out-of-bounds memory could contain memory addresses or other information that can be used to bypass ASLR and other protection mechanisms in order to improve the reliability of exploiting a separate weakness for code execution.
Availability
Technical Impact: DoS: Crash, Exit, or Restart
An attacker could cause a segmentation fault or crash by causing memory to be read outside of the bounds of the buffer. This is especially likely when the code reads a variable amount of data and assumes that a sentinel exists to stop the read operation, such as a NUL in a string.
Other
Technical Impact: Varies by Context
The read operation could produce other undefined or unexpected results.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.