PatchSiren

PatchSiren cyber security CVE debrief

CVE-2026-70640 ggml-org CVE debrief

AI-assisted PatchSiren debrief based on the supplied source corpus. The CVE record was published on 2026-08-06T22:18:28.927Z and has not been modified since then. The NVD entry is currently Awaiting Analysis. This race condition use-after-free vulnerability exists in llama.cpp builds b1886 through b7445, specifically in the LLaMA-Android JNI wrapper affecting functions bench_1model() and free_1context(). Synchronization issues allow Thread A to operate on freed memory while Thread B concurrently frees the llama_context. Attackers can exploit this by performing heap spray with attacker-controlled data containing a fake vtable to hijack the vtable pointer at offset +0x30, causing llama_batch_allocr::clear() to dereference arbitrary memory and achieve remote code execution. Developers and administrators should review and apply patches, monitor for exploitation attempts, and conduct inventory checks to identify and remediate affected systems.

Vendor
ggml-org
Product
llama.cpp
CVSS
HIGH 7.3
CISA KEV
Not listed in stored evidence
Original CVE published
2026-08-06
Original CVE updated
2026-08-31
Advisory published
2026-08-06
Advisory updated
2026-08-31

Who should care

Developers and administrators using llama.cpp builds b1886 through b7445, particularly those integrating LLaMA-Android JNI wrapper functionality, should be aware of this vulnerability and take steps to mitigate potential risks.

Technical summary

A race condition use-after-free vulnerability exists in llama.cpp builds b1886 through b7445. The vulnerability is located in the LLaMA-Android JNI wrapper, specifically affecting functions bench_1model() and free_1context(). Synchronization issues allow Thread A to operate on freed memory while Thread B concurrently frees the llama_context. Attackers can exploit this by performing heap spray with attacker-controlled data containing a fake vtable to hijack the vtable pointer at offset +0x30, causing llama_batch_allocr::clear() to dereference arbitrary memory and achieve remote code execution.

Defensive priority

High-priority defensive review required for llama.cpp builds b1886 through b7445 due to a race condition use-after-free vulnerability.

Recommended defensive actions

  • Review and apply vendor-provided patches or updates for llama.cpp
  • Implement additional monitoring and logging to detect potential exploitation attempts
  • Conduct thorough inventory checks to identify affected systems and prioritize remediation
  • Consider compensating controls, such as restricting access to vulnerable systems or implementing network segmentation
  • Review system configurations and ensure proper synchronization mechanisms are in place
  • Perform regular security audits to identify and address potential vulnerabilities
  • Continuously monitor systems for suspicious activity and implement incident response plans

Evidence notes

Evidence from official sources indicates a race condition use-after-free vulnerability exists in llama.cpp builds b1886 through b7445. The vulnerability is located in the LLaMA-Android JNI wrapper, specifically affecting functions bench_1model() and free_1context(). Synchronization issues allow Thread A to operate on freed memory while Thread B concurrently frees the llama_context. Limited information is available on the exploitability and potential impact.

Sources and references

Verified primary and authoritative sources

  • CVE-2026-70640 CVE Program record

    Publisher, destination, and source semantics verified

    URL: https://www.cve.org/CVERecord?id=CVE-2026-70640

    CVE Program - Official CVE Program record with source-provided CVE metadata.

  • CVE-2026-70640 NVD vulnerability detail

    Publisher, destination, and source semantics verified

    URL: https://nvd.nist.gov/vuln/detail/CVE-2026-70640

    NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.

Supplemental references

Methodology and review provenance

AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.