Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2024-34359

published critical CVSS 3.1 · 9.7

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

Published
10 May 2024, 17:07:18 UTC
Updated
02 Aug 2024, 02:51:10 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
abetlen — llama-cpp-python>= 0.2.30, <= 0.2.71 Affected Not stated GitHub_M
abetlen — llama-cpp-python0.2.30 through 0.2.71 · Other versions: unknown Affected Not stated CISA-ADP

Description

llama-cpp-python is the Python bindings for llama.cpp. `llama-cpp-python` depends on class `Llama` in `llama.py` to load `.gguf` llama.cpp or Latency Machine Learning Models. The `__init__` constructor built in the `Llama` takes several parameters to configure the loading and running of the model. Other than `NUMA, LoRa settings`, `loading tokenizers,` and `hardware settings`, `__init__` also loads the `chat template` from targeted `.gguf` 's Metadata and furtherly parses it to `llama_chat_format.Jinja2ChatFormatter.to_chat_handler()` to construct the `self.chat_handler` for this model. Nevertheless, `Jinja2ChatFormatter` parse the `chat template` within the Metadate with sandbox-less `jinja2.Environment`, which is furthermore rendered in `__call__` to construct the `prompt` of interaction. This allows `jinja2` Server Side Template Injection which leads to remote code execution by a carefully constructed payload.

en · GitHub_M · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
9.7 / 10
Severity
critical
Provider
GitHub_M · cna
Vector string
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
abetlen llama-cpp-python >= 0.2.30, <= 0.2.71 (affected) GitHub_M · cna
abetlen llama-cpp-python 0.2.30 through 0.2.71 (affected · custom)Default: unknown CISA-ADP · adp

Weaknesses

1
  • CWE-76 CWE-76: Improper Neutralization of Equivalent Special Elements (GitHub_M · cna)

References

2

Provider assertions

3

GitHub_M · cna

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

CISA-ADP · adp

CISA ADP Vulnrichment

CVE · adp

CVE Program Container

Provenance

Schema
5.1
Searchable
yes
Content hash
e4217e0a94bf31b6f2a82c88cb8b9bac893577dcb37aeb2a6b2f76b4e5b48668
Ingested
23 Sep 2026, 08:23:23 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected