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

- Severity: High 8.8 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.65%, higher than 77% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-03-20T10:11:36.172Z
- Modified: 2026-09-10T03:49:47.802Z
- Also known as: GHSA-53gh-p8jc-7rg8, PYSEC-2026-1541
- Weaknesses: CWE-77, CWE-94
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: @huntr_ai

## 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.

(As written by CVE List.)

## Affected

- berriai berriai/litellm: from unspecified before v1.65.4.dev6
- litellm (PyPI): from 1.40.3.dev2 up to 1.40.12
- litellm litellm: before 1.65.4; 1.65.4

## Every score

- @huntr_ai: CVSS:3.0 8.8 High `CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.0 8.8 High `CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.0 8.8 High `CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

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

## Sources

- CVE List: [CVE-2024-6825](https://www.cve.org/CVERecord?id=CVE-2024-6825), CVE Terms of Use, modified 2025-10-15
- GitHub Advisory Database: [GHSA-53gh-p8jc-7rg8](https://github.com/advisories/GHSA-53gh-p8jc-7rg8), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2024-6825](https://nvd.nist.gov/vuln/detail/CVE-2024-6825), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1541](https://osv.dev/vulnerability/PYSEC-2026-1541), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2024-6825 · Whole record: https://cve.day/CVE-2024-6825.json · Rebuilt by cve.day 2026-11-25T22:58:52.370Z
