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

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

  • State: open
  • Author: @Correctover
  • Labels: potential-duplicate

## 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 `http_request()` 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 (1 events)
#0 of 0 · 31d18h35m33s ago — entered · #import:https:::github.com:berriai:litellm post #2271
The left requires security-sensitive changes to outbound request handling, careful validation across execution paths, and regression testing for bypasses and network edge cases. The right is more likely a localized input-normalization fix with narrower testing and integration scope.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search