Home
» GitHub Advisories
» GHSA-53gh-p8jc-7rg8
Description
BerriAI/litellm version 1.40.12 contains a vulnerability that allows remote code execution. The issue exists in the handling of the 'post_call_rules' configuration, where a callback function can be added. The provided value is split at the final '.' mark, with the last part considered the function name and the remaining part appended with the '.py' extension and imported. This allows an attacker to set a system method, such as 'os.system', as a callback, enabling the execution of arbitrary commands when a chat response is processed.
Basic information
Type
reviewed
Severity
high
Advisory on GitHub
Open advisory ↗
Repository advisory
—
Source code
Browse source ↗
Published (advisory)
2025-03-20 12:32:45 UTC
Updated
2025-10-15 16:06:59 UTC
GitHub reviewed
2025-03-20 19:55:11 UTC
NVD published
2025-03-20
EPSS Score
Score
Percentile
1.35%
79.67%
CVSS Scores
Base score
Version
Severity
Vector
8.8
3.0
—
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
CWEs
CWE id
Name
CWE-77
Improper Neutralization of Special Elements used in a Command ('Command Injection')
CWE-94
Improper Control of Generation of Code ('Code Injection')
Affected packages (1)
Vulnerable version ranges and first patched releases as published by GitHub.
Ecosystem
Package
Vulnerable range
First patched
Vulnerable functions
pip
litellm
>= 1.40.3.dev2, <= 1.40.12
—
—
cvelogic
Threat Intelligence