Skip to main content
CVE-2024-34359VulnerabilityPublished Updated

llama-cpp-python vulnerable to Remote Code Execution by Server-Side Template Injection in Model Metadata

Affects llama-cpp-pythonSource GCVE Database

0
Compare

Not known to be exploited · CVSS 9.6 Critical : upgrade to 0.2.72 as a priority.

Data as of 16 Nov 2026, 17:33 UTC

CVSS 3.1 base score
9.6Critical
How severe the flaw is on the 0–10 CVSS scale.
Patch
Available – fixed in 0.2.72
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 13 May 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 15 Nov 2026.

What to do

Upgrade llama-cpp-python to 0.2.72.

Affected software

ProductAffectedFixed in
PyPIllama-cpp-pythonAffected
  • >=0.2.30 <0.2.72
Fixed in
  • 0.2.72

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Users should upgrade to version 0.2.72 or later where this vulnerability is fixed. No other mitigations are indicated by the vendor advisory. Applying the official patch fully addresses the issue.

Description

A critical remote code execution (RCE) vulnerability exists in llama-cpp-python versions 0.2.30 up to but not including 0.2.72. The vulnerability arises from unsafe parsing of a chat template stored in model metadata using Jinja2 without sandboxing, allowing server-side template injection. This flaw enables an attacker to execute arbitrary code on the host running the vulnerable software.

References

Community reviews

Loading reviews…