18 views
-/https://github.com/berriai/litellm/issues/28259
GitHub · issue

#28259 Variant analysis around recent guardrail/prompt advisories: DoS-by-admin via untimed module exec + SSRF design note

  • State: open
  • Author: @CrunchyJohnHaven

Variant analysis following GHSA-wxxx-gvqv-xp7p (custom-code sandbox escape, fixed in 1.83.11) and GHSA-xqmj-j6mv-4862 (SSTI in `/prompts/test`, fixed in 1.83.7). Public source code review at HEAD; no proof-of-concept, no testing against any deployed instance.

Filing as a regular issue rather than a security advisory because both findings below are admin-gated (so they're DoS-by-admin, not external attacker reachable) and the third item is a design note rather than a bug. If you'd prefer any of them be tracked privately, let me know and I'll re-route.

---

## Finding 1 — Module-level `exec()` in `POST /guardrails/test_custom_code` runs without timeout protection (Low-Medium, DoS-by-admin)

**File:** `litellm/proxy/guardrails/guardrail_endpoints.py`, around line 2097

The endpoint correctly requires `PROXY_ADMIN` (line 2084) and correctly applies a 5-second `concurrent.futures.ThreadPoolExecutor` timeout to the `apply_guardrail` *function call* (lines 2149-2158). However, the **module-level `exec()` at line 2097 runs in the FastAPI handler thread with no timeout**:

```python EXECUTION_TIMEOUT_SECONDS = 5

try: exec_globals = build_sandbox_globals()

try: compiled =…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d17h56m53s ago — entered · #import:https:::github.com:berriai:litellm post #2930
28259 requires security-sensitive execution isolation, timeout semantics, and broader threat-model validation; 28515 is a comparatively localized schema-normalization and provider-translation fix.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search