{"id":"CVE-2026-59821","published":"2026-07-08T19:14:13Z","modified":"2026-07-09T14:38:09Z","title":"LiteLLM: Custom Code Guardrails production endpoints bypass code safety checks","vendor":"BerriAI","product":"litellm","tier":"core","eol":null,"affectedVersions":[{"vendor":"BerriAI","product":"litellm","versions":["< 1.82.0-stable"]}],"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.","provenance":"source","from":"CVE.org"},"summary":null,"cvss":{"score":2.1,"severity":"LOW","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00904,"percentile":0.598,"date":"2026-10-31","provenance":"source"},"kev":null,"vulncheckKev":{"dateAdded":"2026-07-26","exploitedFirstSeen":"2026-07-26","ransomware":false,"evidence":[{"url":"https://www.linkedin.com/posts/yaarashriki_cve-2026-59821-cve-2026-59822-i-found-activity-7487129774184632320-TvsW/","date":"2026-07-26"}],"evidenceTotal":1,"provenance":"source"},"exploited":true,"otx":null,"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"references":[{"url":"https://github.com/BerriAI/litellm/security/advisories/GHSA-72m8-9m7m-h278","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/BerriAI/litellm/commit/e50b4486d0f7aa0497185a1ebcdd2c91f1769eba","tags":["x_refsource_MISC"]},{"url":"https://github.com/BerriAI/litellm/releases/tag/v1.82.0-stable","tags":["x_refsource_MISC"]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"PyPI","package":"litellm","vulnerableRanges":["<1.82.0"],"patched":["1.82.0"],"from":["GHSA-72m8-9m7m-h278","PYSEC-2026-3478"],"provenance":"source"}],"advisories":[{"id":"GHSA-72m8-9m7m-h278","url":"https://github.com/advisories/GHSA-72m8-9m7m-h278","severity":"LOW","ecosystem":"PyPI","package":"litellm","vulnerableRanges":["<1.82.0"],"patched":["1.82.0"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2026-42350","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-42350","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":null,"exploitRefs":[],"flow":[],"timeline":[{"date":"2026-07-08","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2026-59821","provenance":"source"},{"date":"2026-07-26","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://www.linkedin.com/posts/yaarashriki_cve-2026-59821-cve-2026-59822-i-found-activity-7487129774184632320-TvsW/","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":null,"daysToKev":null},"priority":{"score":53.4,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in VulnCheck KEV"},{"name":"Recent KEV listing","points":5.0,"detail":"added 98 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":11.96,"detail":"percentile 0.5980"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":0.0,"detail":"none found"},{"name":"Mentioned in OTX pulses","points":0.0,"detail":"0 pulses"},{"name":"CVSS severity","points":1.47,"detail":"base score 2.1"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]},"lineage":{"packageHistory":[{"cve":"CVE-2024-10188","published":"2025-03-20","fixed":"1.53.1.dev1","kev":false},{"cve":"CVE-2024-8984","published":"2025-03-20","fixed":"1.56.2","kev":false},{"cve":"CVE-2025-0628","published":"2025-03-20","fixed":"1.61.15","kev":false,"link":{"from":"CVE-2025-0628","to":"CVE-2026-59821","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:litellm","fromFixed":"1.61.15","toFixed":"1.82.0","daysApart":475}]}},{"cve":"CVE-2026-59821","published":"2026-07-08","fixed":"1.82.0","kev":false},{"cve":"CVE-2026-35029","published":"2026-04-06","fixed":"1.83.0","kev":false},{"cve":"CVE-2026-35030","published":"2026-04-06","fixed":"1.83.0","kev":false},{"cve":"CVE-2026-37004","published":"2026-08-27","fixed":"1.83.7","kev":false}],"package":"PyPI:litellm"}}