CVE-2024-4889: berriai/litellm - Server-Side Template Injection
- Cve: CVE-2024-4889
- Name: berriai/litellm - Server-Side Template Injection
- Description: A code injection vulnerability exists in the berriai/litellm application, version 1.34.6, due to the use of unvalidated input in the eval function within the secret management system. This vulnerability requires a valid Google KMS configuration file to be exploitable. Specifically, by setting the `UI_LOGO_PATH` variable to a remote server address in the `get_image` function, an attacker can write a malicious Google KMS configuration file to the `cached_logo.jpg` file. This file can then be used to execute arbitrary code by assigning malicious code to the `SAVE_CONFIG_TO_DB` environment variable, leading to full system control. The vulnerability is contingent upon the use of the Google KMS feature.
- Impact: Attackers can execute arbitrary code, potentially gaining full control over the system.
- Remediation: Update to the latest version where this vulnerability is fixed or apply patches that validate input before eval.
- Vulnerability type: template_injection
- Vulnerability impact: remote_code_execution
- Requirement type: user_interaction
- Requirements: Attacker needs to set UI_LOGO_PATH to a remote server and have a valid Google KMS configuration file
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 7.2
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.00859
- Epss percentile: 0.59406
- Assignee: [email protected]
- Published at: 2024-06-06T18:15:18Z
- Age in days: 901
- Modified at: 2026-06-17T08:03:06Z
- Patch available: yes
- Public exploits total: 1
- References total: 1
- Products total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-4889
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, oss, projects total, projects, rejected by nvd
- Not known: hackerone
Cwe
| Id | Name |
|---|---|
| CWE-94 | Improper Control of Generation of Code |
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://huntr.com/bounties/be3fda72-a65b-4993-9a0e-7e0f05db51f8 | nvd | 2024-06-06 |
References
| Url | Source | Tags |
|---|---|---|
| https://huntr.com/bounties/be3fda72-a65b-4993-9a0e-7e0f05db51f8 | nvd | Exploit, Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| litellm:litellm | < 1.44.16 | no | nvd | /v1/products/litellm/litellm |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Public exploit: yes
- Public exploit count: 1
- Public exploit first date: 2024-06-06
- Remote: yes
- Authentication required: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts