S4E just found a medium-severity finding from leaked token-api key scanner
PlatformPlansPartners
Resources
ToolsBlogDocs
Sign Up →
high·Product Based Web Vulnerabilities·Updated Aug 30, 2026

CVE-2026-40217 Scanner

CVE-2026-40217 Scanner - Remote Code Execution vulnerability in LiteLLM

Est. Time~10 seconds
Scan TypeSingle Scan
Targetsurl
CostFree
3
Times Used
continuous scan runs
6.1k
Continuously Checked
assets under CS
0
Vulnerabilities Found
confirmed findings
References
CVECVE-2026-40217
8.8
CVSShigh
Exploitable remotely over the internet · low-privilege account sufficient.

LiteLLM through 2026-04-08 allows remote attackers to execute arbitrary code via bytecode rewriting at the /guardrails/test_custom_code URI.

Attack Vector
Network
Privileges Req.
Low
User Interaction
None
Affected
LiteLLMby BerriAI
bb0639701796218a3447160e55c0f1097446e4e6085df7dfd39f476d4143743f
Red Hat Ansible Automation Platform 2.6by Red Hat
AFFECTED< *SAFE ✓≥ *
Red Hat OpenShift AI 3.3by Red Hat
AFFECTED< *SAFE ✓≥ *
Lightspeed Coreby Red Hat
Updated Sep 9, 2026View on NVD →
Detail

LiteLLM is a tool used in AI model development environments for managing and orchestrating language models. This software is popular among developers and data scientists who require efficient management tools for language models. It facilitates testing and training of language models within a containerized setting, often deployed using Docker. LiteLLM aids in managing custom guardrails that apply safety checks to prevent model misuse. The solution aims to ensure safe AI practices by enforcing policies throughout the development lifecycle. Due to its container usage, ensuring low-level access control is critical for maintaining a secure development environment.

The vulnerability in LiteLLM occurs due to insufficient filtering in the /guardrails/test_custom_code endpoint. With this vulnerability, an attacker could execute arbitrary Python code using specially crafted requests. The exploitation involves bypassing the intended restrictions through manipulating Python's bytecode. This vulnerability predominantly impacts authenticated users who possess the master API key, thus restricting the potential pool of exploiters to insiders or users with administrative privileges. The unfiltered access to the guardrails test function forms the core severity of this vulnerability which can result in unauthorized access and actions.

Technically, the vulnerability surfaces from a lack of proper input sanitization at the /guardrails/test_custom_code endpoint. By leveraging Python's dynamic nature, attackers manipulate Python's functions to execute unintended commands. This involves using Python's string operations to bypass initial validations and gain access to restricted methods. The flexibility offered by Python in object manipulation aids in achieving remote code execution. An attacker may exploit this to escalate their access levels or mitigate protective measures, exploiting the application's trust in user input. Detected within the API management domain, this vulnerability warrants careful evaluation of all API interactions.

Exploitation of this vulnerability can lead to unauthorized command execution within the application server context. The resultant impact could be severe if executed with root privileges, potentially leading to system compromise. Attackers could exfiltrate data, inject malicious processes, or cause a denial of service. The risk profile increases exponentially when the application is deployed in multi-tenant or shared environments. Additionally, the vulnerability enables lateral movements, allowing attackers to pivot deeper within network infrastructures. Access to confidential data, unauthorized process manipulation, and significant disruption to AI development workflows mark potential exploitation outcomes.

REFERENCES

Solution Advice
  • Block access to the /guardrails/test_custom_code endpoint at the reverse proxy level.
  • Restrict admin API access to trusted networks only.
  • Avoid exposing the management interface to untrusted environments.
  • Ensure that LiteLLM is not run as root to minimize privileges.
  • Apply all available vendor patches to mitigate the vulnerability.

Get AI-powered remediation steps tailored to your asset.

Try AI Solutions →

Check your infrastructure.
Right now.

11,000+ scanners. Free to start. No credit card required.

CVE-2026-40217 Scanner - Remote Code Execution vulnerability in LiteLLM | S4E