# CVE-2026-59821: LiteLLM: Custom Code Guardrails production endpoints bypass code safety checks

- Priority: **Routine**
- Reason: Not severe (CVSS 2.1, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-07-08 · Modified: 2026-07-09
- Aliases: GHSA-72m8-9m7m-h278, PYSEC-2026-3478
- Record: https://cvemate.com/vulnerability/CVE-2026-59821 · JSON: https://cvemate.com/vulnerability/CVE-2026-59821/json

## Description

```text
LiteLLM is a proxy server (AI Gateway) to call LLM APIs in OpenAI (or native) format. Prior to 1.82.0-stable, LiteLLM's Custom Code Guardrails production create and update paths did not apply the same sandboxing and validation used by the test endpoint, allowing a privileged user with access to create or update guardrails to submit custom Python code that executed in the LiteLLM proxy environment and could expose secrets available to the process. This issue is fixed in version 1.82.0-stable.
```

## Signals

- CVSS: 7.2 high (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.729%, percentile 55.573%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- berriai litellm: \< 1.82.0-stable
- litellm litellm: \< 1.82.0 \| 1.82.0:nightly
- PyPI litellm (PyPI): \< 1.82.0

## References

- <https://github.com/BerriAI/litellm/security/advisories/GHSA-72m8-9m7m-h278>
- <https://github.com/BerriAI/litellm/commit/e50b4486d0f7aa0497185a1ebcdd2c91f1769eba>
- <https://github.com/BerriAI/litellm/releases/tag/v1.82.0-stable>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-59821>
- <https://github.com/BerriAI/litellm>
- <https://pypi.org/project/litellm>
- <https://github.com/advisories/GHSA-72m8-9m7m-h278>

---

Data as of 2026-12-05T08:33:04.920Z. 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
