GHSA-wxxx-gvqv-xp7p

Suggest an improvement
Source
https://github.com/advisories/GHSA-wxxx-gvqv-xp7p
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-wxxx-gvqv-xp7p/GHSA-wxxx-gvqv-xp7p.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-wxxx-gvqv-xp7p
Aliases
  • CVE-2026-40217
Downstream
Published
2026-05-11T16:17:23Z
Modified
2026-05-11T16:37:33.396331Z
Severity
  • 8.8 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
  • 7.5 (High) CVSS_V4 - CVSS:4.0/AV:N/AC:H/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N CVSS Calculator
Summary
LiteLLM has a sandbox escape in custom-code guardrail
Details

Impact

The POST /guardrails/test_custom_code endpoint runs user-supplied Python inside a hand-rolled sandbox. The sandbox can be escaped using bytecode-level techniques, allowing arbitrary code execution in the proxy process — which runs as root in the default Docker image.

Reaching the endpoint requires a proxy-admin credential in default configurations.

Patches

Fixed in 1.83.11. The hand-rolled sandbox has been replaced with RestrictedPython. Upgrade to 1.83.11 or later.

Workarounds

If upgrading is not immediately possible, block POST /guardrails/test_custom_code at your reverse proxy or API gateway.

References

Database specific
{
    "severity": "HIGH",
    "cwe_ids": [
        "CWE-420",
        "CWE-913"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-05-11T16:17:23Z",
    "nvd_published_at": null
}
References

Affected packages

PyPI / litellm

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
1.81.8
Fixed
1.83.10

Affected versions

1.*
1.81.8
1.81.9.dev1
1.81.9
1.81.10
1.81.11
1.81.12
1.81.13
1.81.14
1.81.15
1.81.16
1.82.0
1.82.1
1.82.2
1.82.3
1.82.4
1.82.5
1.82.6
1.83.0
1.83.1
1.83.2
1.83.3
1.83.4
1.83.5
1.83.6
1.83.7
1.83.8
1.83.9

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-wxxx-gvqv-xp7p/GHSA-wxxx-gvqv-xp7p.json"