# CVE-2024-6825: Remote Code Execution in BerriAI/litellm

- Priority: **Prioritise**
- Reason: Public exploit (reference, Date unknown)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2025-03-20 · Modified: 2025-10-15
- Aliases: GHSA-53gh-p8jc-7rg8, PYSEC-2026-1541
- Record: https://cvemate.com/vulnerability/CVE-2024-6825 · JSON: https://cvemate.com/vulnerability/CVE-2024-6825/json

## Description

```text
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.
```

## Signals

- CVSS: 8.8 high (v3.0, CVE.org) CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 1.636%, percentile 77.16%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (reference)

## Affected

- berriai berriai/litellm: ≥ unspecified, \< v1.65.4.dev6
- litellm litellm: \< 1.65.4 \| 1.65.4:dev2
- PyPI litellm (PyPI): ≥ 1.40.3.dev2, ≤ 1.40.12

## References

- <https://huntr.com/bounties/1d98bebb-6cf4-46c9-87c3-d3b1972973b5>
- <https://github.com/berriai/litellm/commit/441c7275ed2715f47650a7c2e525055c804073a9>
- <https://nvd.nist.gov/vuln/detail/CVE-2024-6825>
- <https://github.com/BerriAI/litellm>
- <https://github.com/BerriAI/litellm/blob/056913fd7049923a106130b02d7c29e7f312beec/litellm/utils.py#L2818>
- <https://pypi.org/project/litellm>
- <https://github.com/advisories/GHSA-53gh-p8jc-7rg8>

---

Data as of 2026-12-05T13:06:09.693Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
