{"schema":"/api/v1/schema/cve.json","api_version":"1","id":"CVE-2024-34359","published":"2024-05-14T15:38:45.093000Z","last_modified":"2026-06-17T07:33:14.750000Z","status":"Deferred","cvss":{"version":"3.1","score":9.6,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","source":"security-advisories@github.com","primary":false},"auth":false,"cwes":["CWE-76"],"cpes":[],"cpes_truncated":false,"vendors":["abetlen"],"products":["abetlen/llama-cpp-python"],"ssvc":{"exploitation":"poc","automatable":"no","technical_impact":"total"},"epss":{"score":0.01347,"percentile":0.71601,"date":"2026-11-30","model_version":"v2026.06.15"},"cat":"app","platform":"multi","eol":false,"packages":[{"advisory":"GHSA-56xg-wfcc-g829","ecosystem":"PyPI","name":"llama-cpp-python","purl":"pkg:pypi/llama-cpp-python","ranges":[{"introduced":"0.2.30","fixed":"0.2.72"}],"versions":["0.2.30","0.2.31","0.2.32","0.2.33","0.2.34","0.2.35","0.2.36","0.2.37","0.2.38","0.2.39","0.2.40","0.2.41","0.2.42","0.2.43","0.2.44","0.2.45","0.2.46","0.2.47","0.2.48","0.2.49","0.2.50","0.2.51","0.2.52","0.2.53","0.2.54","0.2.55","0.2.56","0.2.57","0.2.58","0.2.59","0.2.60","0.2.61","0.2.62","0.2.63","0.2.64","0.2.65","0.2.66","0.2.67","0.2.68","0.2.69","0.2.70","0.2.71"],"versions_truncated":false},{"advisory":"PYSEC-2026-392","ecosystem":"PyPI","name":"llama-cpp-python","purl":"pkg:pypi/llama-cpp-python","ranges":[{"introduced":"0.2.30","fixed":"0.2.72"}],"versions":["0.2.30","0.2.31","0.2.32","0.2.33","0.2.34","0.2.35","0.2.36","0.2.37","0.2.38","0.2.39","0.2.40","0.2.41","0.2.42","0.2.43","0.2.44","0.2.45","0.2.46","0.2.47","0.2.48","0.2.49","0.2.50","0.2.51","0.2.52","0.2.53","0.2.54","0.2.55","0.2.56","0.2.57","0.2.58","0.2.59","0.2.60","0.2.61","0.2.62","0.2.63","0.2.64","0.2.65","0.2.66","0.2.67","0.2.68","0.2.69","0.2.70","0.2.71"],"versions_truncated":false}],"severity":"critical","priority_score":73,"links":{"html_es":"/es/cve/CVE-2024-34359/","html_en":"/en/cve/CVE-2024-34359/","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2024-34359","cve_org":"https://www.cve.org/CVERecord?id=CVE-2024-34359"},"untrusted":{"vendor_name":"abetlen","product_name":"llama-cpp-python","desc_en":"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.","affected":[{"untrusted_vendor":"abetlen","untrusted_product":"llama-cpp-python","versions":[]}],"references":[{"url":"https://github.com/abetlen/llama-cpp-python/commit/b454f40a9a1787b2b5659cd2cb00819d983185df","tags":[]},{"url":"https://github.com/abetlen/llama-cpp-python/security/advisories/GHSA-56xg-wfcc-g829","tags":[]}]}}