Skip to content

litellm passes untrusted data to `eval` function without sanitization

High severity GitHub Reviewed Published May 18, 2024 to the GitHub Advisory Database • Updated May 20, 2024

Package

pip litellm (pip)

Affected versions

<= 1.28.11

Patched versions

None

Description

A remote code execution (RCE) vulnerability exists in the berriai/litellm project due to improper control of the generation of code when using the eval function unsafely in the litellm.get_secret() method. Specifically, when the server utilizes Google KMS, untrusted data is passed to the eval function without any sanitization. Attackers can exploit this vulnerability by injecting malicious values into environment variables through the /config/update endpoint, which allows for the update of settings in proxy_server_config.yaml.

References

Published by the National Vulnerability Database May 18, 2024
Published to the GitHub Advisory Database May 18, 2024
Reviewed May 20, 2024
Last updated May 20, 2024

Severity

High
7.2
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Weaknesses

CVE ID

CVE-2024-4264

GHSA ID

GHSA-7ggm-4rjg-594w

Source code

Checking history
See something to contribute? Suggest improvements for this vulnerability.