SCA: security update for llama-cpp-python (GHSA-56xg-wfcc-g829)

critical Tenable Self-Hosted Container Security Plugin ID 421395

Description

There are packages installed that are affected by a vulnerability referenced in the following CVE:

- 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. (CVE-2024-34359)

See Also

https://github.com/advisories/GHSA-56xg-wfcc-g829

Plugin Details

Severity: Critical

ID: 421395

Version: Revision 1.17

Type: Local

Family: SCA Checks

Published: 3/28/2025

Updated: 7/2/2026

Supported Sensors: Tenable Cloud Security, Tenable Self-Hosted Container Security

Risk Information

VPR

Risk Factor: High

Score: 7

Percentile: 98.3

Vendor

Vendor Severity: Critical

CVSS v2

Risk Factor: Critical

Base Score: 10

Temporal Score: 7.4

Vector: CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C

CVSS Score Source: CVE-2024-34359

CVSS v3

Risk Factor: Critical

Base Score: 9.6

Temporal Score: 8.3

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:U/RL:O/RC:C

Vulnerability Information

Exploit Ease: No known exploits are available

Patch Publication Date: 5/13/2024

Vulnerability Publication Date: 5/10/2024

Reference Information

CVE: CVE-2024-34359

cwe: CWE-76