Description
LiteLLM through 2026-04-08 allows remote attackers to execute arbitrary code via bytecode rewriting at the /guardrails/test_custom_code URI.
Published: 2026-04-10
Score: 8.8 High
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution
Action: Immediate Patch
AI Analysis

Impact

LiteLLM implementations prior to April 8 2026 contain a flaw that allows attackers to inject and execute arbitrary bytecode through the /guardrails/test_custom_code endpoint. The vulnerability stems from unsafe bytecode rewriting, which can lead to execution of arbitrary code on the host system. This flaw can compromise confidentiality, integrity, and availability of the affected environment, potentially allowing a remote attacker to gain full control of the affected service.

Affected Systems

The issue affects BerriAI’s LiteLLM product. All versions of LiteLLM released on or before April 8 2026 are impacted. Precise version numbers are not listed, so any installation derived from the affected code base should be assumed vulnerable.

Risk and Exploitability

The CVSS score of 8.8 indicates high severity, while an EPSS score below 1 % suggests limited current exploitation activity. The vulnerability is not currently flagged in the CISA KEV catalog. Based on the description, the likely attack vector is a remote HTTP request to the /guardrails/test_custom_code URI, requiring network reachability to the service. If the endpoint is publicly reachable, an attacker can exploit this flaw without user interaction. The absence of additional mitigations in the cited advisory indicates the flaw can be fully leveraged once the endpoint is reachable.

Generated by OpenCVE AI on April 14, 2026 at 01:42 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade LiteLLM to a version released after April 8 2026 or apply the vendor‑provided patch. If a patch is not yet available, disable or restrict access to the /guardrails/test_custom_code endpoint. Deploy network controls to block external traffic to the vulnerable endpoint until a patch is applied. Verify the update with vendor documentation or security advisories.

Generated by OpenCVE AI on April 14, 2026 at 01:42 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 27 Apr 2026 23:15:00 +0000

Type Values Removed Values Added
First Time appeared Litellm
Litellm litellm
CPEs cpe:2.3:a:litellm:litellm:*:*:*:*:*:*:*:*
Vendors & Products Litellm
Litellm litellm

Tue, 14 Apr 2026 15:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Tue, 14 Apr 2026 00:15:00 +0000

Type Values Removed Values Added
Title Remote Code Execution via Bytecode Rewriting on /guardrails/test_custom_code in LiteLLM LiteLLM: LiteLLM: Arbitrary Code Execution via bytecode rewriting
Weaknesses CWE-94
References
Metrics threat_severity

None

threat_severity

Important


Mon, 13 Apr 2026 14:30:00 +0000

Type Values Removed Values Added
Title Remote Code Execution via Bytecode Rewriting on /guardrails/test_custom_code in LiteLLM

Mon, 13 Apr 2026 13:00:00 +0000

Type Values Removed Values Added
First Time appeared Berriai
Berriai litellm
Vendors & Products Berriai
Berriai litellm

Fri, 10 Apr 2026 14:15:00 +0000

Type Values Removed Values Added
Description LiteLLM through 2026-04-08 allows remote attackers to execute arbitrary code via bytecode rewriting at the /guardrails/test_custom_code URI.
Weaknesses CWE-420
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2026-04-14T14:39:03.619Z

Reserved: 2026-04-10T13:43:22.641Z

Link: CVE-2026-40217

cve-icon Vulnrichment

Updated: 2026-04-14T14:38:56.870Z

cve-icon NVD

Status : Analyzed

Published: 2026-04-10T14:16:36.307

Modified: 2026-04-27T23:00:47.880

Link: CVE-2026-40217

cve-icon Redhat

Severity : Important

Publid Date: 2026-04-10T13:43:23Z

Links: CVE-2026-40217 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-04-14T16:36:31Z

Weaknesses