All vulnerabilities

Servers and applications

CVE-2026-59821

Custom Code Guardrails production endpoints bypass code safety checks

Severity
Low 2.1
Published
30 Jun 2026
Last changed
25 Oct 2026
Added to UpHeron
1 Nov 2026
Fixed in
1.82.0, 1.82.0-stable
Exploit chance
0.9% in the next 30 daysHigher than 60% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Code injection (CWE-94)
Attack
Over the network · Only under certain conditions · Needs an administrator account · No user action needed
Attacker can
Read some data · Change some data · Slow it down
CVSS 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/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
Also known as
GHSA-72m8-9m7m-h278
Sources
NVD, Project advisories (GitHub)

Description

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.

From BerriAI/litellm's security advisory.

Workarounds

If upgrading is not immediately possible:

  • Restrict access to POST /guardrails and PUT /guardrails/{guardrail_id} to trusted administrators only.
  • Ensure LITELLM_MASTER_KEY is configured.
  • Avoid enabling Custom Code Guardrails for untrusted users.
Workarounds as given by BerriAI/litellm's security advisory.

Affected software

SoftwareAffected versions
LiteLLMServers and applications · cpe:a:litellm:litellm
  • Every version before 1.82.0
  • Version 1.82.0-nightly
LiteLLMServers and applications · github:berriai/litellm
  • Every version before 1.82.0-stable

About LiteLLM

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

From its GitHub repository.
Weekly downloads (PyPI)
23,483,590PyPI Stats, 15 Nov 2026
GitHub stars
63,271GitHub, 15 Nov 2026
Forks
13,287GitHub, 15 Nov 2026
Latest release
v1.109.1GitHub, 15 Nov 2026
Released
12 Nov 2026GitHub
First published on GitHub
27 Jul 2023GitHub

References

  • NVD https://nvd.nist.gov/vuln/detail/CVE-2026-59821
  • CVE.org https://www.cve.org/CVERecord?id=CVE-2026-59821
  • GitHub Advisory Database https://github.com/advisories/GHSA-72m8-9m7m-h278
  • github.com https://github.com/BerriAI/litellm/security/advisories/GHSA-72m8-9m7m-h278