6 views
-/https://github.com/berriai/litellm/issues/32889
GitHub · issue

#32889 Security: SSRF vulnerability in guardrail http_request() primitive

  • State: open
  • Author: @Correctover

## Security Vulnerability Report

**Vulnerability:** SSRF in guardrail http_request() primitive **Severity:** Critical (CVSS 8.6) **Affected:** LiteLLM <= 1.86.2 with guardrails enabled

### Description The function in `litellm/proxy/guardrails/guardrail_hooks/custom_code/primitives.py` bypasses the existing SSRF protection infrastructure (`validate_url()` / `safe_get()` in `url_utils.py`).

The function only calls `is_valid_url()` which performs syntactic URL validation via `urlparse`. It does NOT call `validate_url()` which provides: - DNS resolution with blocklist validation against private IPs - Cloud metadata IP blocking (169.254.169.254, 168.63.129.16, etc.) - TOCTOU prevention via URL-to-IP rewrite

### Recommended Fix Replace the direct HTTP client call in `http_request()` with `async_safe_get()` from `url_utils.py`, or add an explicit `validate_url()` call before making the request.

### Note I attempted to report this via Private Vulnerability Reporting API but the `/security-advisories/reports` endpoint returned HTTP 500. Please contact me if you need assistance with coordinated disclosure.

**Reported by:** Correctover Security Research

GitHub resolver

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

Refresh page
vote history (2 events)
#0 of 0 · 31d18h34m28s ago — entered · #import:https:::github.com:berriai:litellm post #2480
The left task is harder because security remediation requires careful validation of every network path, preservation of asynchronous behavior, regression coverage against bypasses and TOCTOU cases, and cautious rollout. The right task is primarily a bounded dashboard presentation change, though it may require some data-flow and image-format handling.
#0 of 0 · 31d18h6m9s ago — current · #import:https:::github.com:berriai:litellm post #2962
The right issue is harder because it requires security-sensitive request-path changes, careful validation and race-condition handling, compatibility checks, regression testing, and coordinated review. The left issue appears more localized to provider integration or error diagnosis.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search