CVE-2026-59821: LiteLLM: Custom Code Guardrails production endpoints bypass code safety checks
Vulnerability summary
CVE-2026-59821 is a high (CVSS 7.2) Improper Control of Generation of Code vulnerability in berriai litellm. EPSS estimates a 0.73% chance of exploitation in the next 30 days, higher than 55.5% of scored vulnerabilities.
Not severe (CVSS 2.1, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 08-07-2026PublishedVulnerability first disclosed.
- 09-07-2026Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
4 scores · 3 sources · 2 versions- OSV · PypiEcosystem advisory · calculated2.1LowCVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
- NVDNIST2.1LowCVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS trend
Probability
0.73%
Chance of exploitation in the next 30 days
Percentile
56%
Versus all other CVEs
30-day change
Decrease -0.17 pp
From 0.90% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, administrative account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Berriai1 product
- litellm< 1.82.0-stable
Litellm1 product
- litellm< 1.82.0 | 1.82.0:nightly
PyPI1 product
- litellm< 1.82.0
3 vendors · 3 products
References
7 links- github.com/BerriAI/litellm/security/advisories/GHSA-72m8-9m7m-h278X Refsource CONFIRMWEBMitigationPatchVendor Advisory
- github.com/BerriAI/litellmPACKAGE
- pypi.org/project/litellmPACKAGE