Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix: extend request body parameter restrictions to cloud provider auth fields

Yuneng Jiang051d49f2fbd2
diff --git a/litellm/proxy/auth/auth_utils.py b/litellm/proxy/auth/auth_utils.py
index 18aea48e96b..448c975d123 100644
--- a/litellm/proxy/auth/auth_utils.py
+++ b/litellm/proxy/auth/auth_utils.py
@@ -151,7 +151,15 @@ def is_request_body_safe(
A malicious user can set the api_base to their own domain and invoke POST /chat/completions to intercept and steal the OpenAI API key.
Relevant issue: https://huntr.com/bounties/4001e1a2-7b7a-4776-a3ae-e6692ec3d997
"""
- banned_params = ["api_base", "base_url", "user_config"]
+ banned_params = [
+ "api_base",
+ "base_url",
+ "user_config",
+ "aws_sts_endpoint",
+ "aws_web_identity_token",
+ "aws_role_name",
+ "vertex_credentials",
+ ]
for param in banned_params:
if (