Server-side Request Forgery (SSRF) Affecting llama-cpp-python package, versions [0.2.30, 0.2.72)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.04% (10th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-PYTHON-LLAMACPPPYTHON-6836783
  • published 12 May 2024
  • disclosed 10 May 2024
  • credit retr0reg

How to fix?

Upgrade llama-cpp-python to version 0.2.72 or higher.

Overview

llama-cpp-python is a Python bindings for the llama.cpp library

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) through the __init__ constructor and __call__ method. An attacker can execute arbitrary code by injecting malicious templates into the chat template which is processed unsafely.

References

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
8.3 high
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    High
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    Required
  • Scope (S)
    Changed
  • Confidentiality (C)
    High
  • Integrity (I)
    High
  • Availability (A)
    High