Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. litellm
  4. ›
  5. CVE-2026-59821

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

July 22, 2026

LiteLLM’s Custom Code Guardrails production create/update paths did not apply the same sandboxing and validation used by the test endpoint.

A privileged user with access to create or update guardrails could submit custom Python code that executed in the LiteLLM proxy environment. In deployments without a configured master key, callers could be treated as proxy administrators, making this reachable without intended administrative authorization.

This could allow arbitrary code execution in the LiteLLM proxy container and exposure of secrets available to the process.

References

  • github.com/BerriAI/litellm/commit/e50b4486d0f7aa0497185a1ebcdd2c91f1769eba
  • github.com/BerriAI/litellm/releases/tag/v1.82.0-stable
  • github.com/BerriAI/litellm/security/advisories/GHSA-72m8-9m7m-h278
  • github.com/advisories/GHSA-72m8-9m7m-h278
  • nvd.nist.gov/vuln/detail/CVE-2026-59821

Code Behaviors & Features

Detect and mitigate CVE-2026-59821 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.82.0

Fixed versions

  • 1.82.0

Solution

Upgrade to version 1.82.0 or above.

Impact 4.7 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:L

Learn more about CVSS

Weakness

  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

pypi/litellm/CVE-2026-59821.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:17:41 +0000.