litellm/litellm
user 0d4875dec9
chore(security): close two unaddressed SSRF cases
Two SSRF findings were OPEN with no in-flight fix; both are closed
now using narrow defenses that key off existing trust boundaries.

VERIA-6 (Milvus ``litellm_embedding_config``):
``is_request_body_safe`` already blocks ``api_base`` / ``api_key`` /
``langfuse_host`` / ``s3_endpoint_url`` / etc. at the *root* of the
request body, gated by an admin opt-in (``allow_client_side_credentials``
or per-deployment ``configurable_clientside_auth_params``). The bug is
that the Milvus vector-store transformer unpacks
``litellm_embedding_config`` into ``litellm.embedding(**embedding_config)``,
so a caller can smuggle the same banned params in via nesting and bypass
the check. Fix: ``is_request_body_safe`` now recurses into a known list
of nested-config dicts (``litellm_embedding_config`` for now) and applies
the same banned-param check with the same admin opt-in. Admin-side
vector-store config flows through ``litellm_params`` rather than the
request body, so it's unaffected.

VERIA-51 (polling URLs returned by upstream APIs):
Azure DALL-E 2, Azure Document Intelligence, and Black Forest Labs
all blindly fetched a polling URL returned by the upstream and
attached the operator's API key to the request. A compromised upstream
or a future API contract change could redirect credentials anywhere.
New ``url_utils.assert_same_origin(candidate, expected)`` helper checks
scheme, host (case-insensitive), and port (with default-port
normalization). Applied at all five polling sites: Azure DALL-E
sync+async, Azure DI sync+async, BFL image generation sync+async, BFL
image edit sync+async. Cross-origin polling URLs now raise rather than
forward credentials. The Azure DALL-E ``Expected 'status' in response``
exception no longer reflects the raw response body — that path turned
Blind SSRF into Full-Read SSRF for the limited window before the
origin check fully closed it.

Tests: 7 ``assert_same_origin`` unit tests, 6 ``is_request_body_safe``
nested-config tests, 5 polling-site rejection tests + 1 same-origin
sanity check.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 18:43:47 +00:00
..
a2a_protocol
anthropic_interface
assistants
batch_completion
batches fix(proxy/batches): forward model to retrieve_batch for bedrock 2026-04-29 22:48:03 +02:00
caching Match docstring style on async_increment_cache 2026-04-30 17:50:58 -07:00
completion_extras Revert "Merge pull request #24417 from Chesars/refactor/shared-format-mapping" 2026-04-25 15:03:24 -03:00
compression
containers
endpoints/speech/speech_to_completion_bridge
evals
experimental_mcp_client
files
fine_tuning
google_genai feat(proxy): LiteLLM headers on Google native generateContent routes (#25500) 2026-04-29 12:34:14 -07:00
images
integrations fix: trim caller-supplied dicts from compile_prompt error message 2026-04-29 15:16:01 -07:00
interactions
litellm_core_utils chore(security): close two unaddressed SSRF cases 2026-05-01 18:43:47 +00:00
llms chore(security): close two unaddressed SSRF cases 2026-05-01 18:43:47 +00:00
ocr
passthrough fix(passthrough): log when streaming spend-tracking flush fails to schedule 2026-04-30 02:39:29 +00:00
proxy chore(security): close two unaddressed SSRF cases 2026-05-01 18:43:47 +00:00
proxy_auth
rag style: black formatting 2026-04-25 14:47:54 -07:00
realtime_api
rerank_api Fix review 2026-04-30 09:10:24 +05:30
responses Revert "Merge pull request #24417 from Chesars/refactor/shared-format-mapping" 2026-04-25 15:03:24 -03:00
router_strategy
router_utils Merge pull request #26691 from BerriAI/litellm_team_search_credentials_metadata 2026-04-30 08:35:17 +05:30
search
secret_managers
skills
types fix: drop milvus dbName and partitionNames from MILVUS_OPTIONAL_PARAMS 2026-04-30 11:51:32 -07:00
vector_store_files
vector_stores
videos
__init__.py
_internal_context.py
_lazy_imports_registry.py
_lazy_imports.py
_logging.py
_redis_credential_provider.py fix(redis): cache GCP IAM token to prevent async event loop blocking (#26441) 2026-04-25 23:13:39 -07:00
_redis.py
_service_logger.py
_uuid.py
_version.py
anthropic_beta_headers_config.json
anthropic_beta_headers_manager.py
blog_posts.json
budget_manager.py
constants.py Merge pull request #26835 from stuxf/codex/cli-sso-flow-binding 2026-04-30 17:10:27 -07:00
cost_calculator.py
cost.json
exceptions.py fix(proxy): invoke post-call guardrails on pass-through endpoint responses (#20270) (#26262) 2026-04-27 08:58:22 +05:30
main.py Merge pull request #26745 from BerriAI/litellm_internal_staging 2026-04-29 09:25:42 +05:30
model_prices_and_context_window_backup.json fix(bedrock): add 1-hour cache write tier for Claude 4.5/4.6/4.7 (Global, US) 2026-04-29 19:21:57 +00:00
mypy.ini
policy_templates_backup.json
provider_endpoints_support_backup.json
py.typed
router.py fix(router): propagate custom cost_per_token from db model_info in fallback path (#25888) 2026-04-27 08:58:41 +05:30
scheduler.py
setup_wizard.py
timeout.py
utils.py Add gpt-image-2 support (#26644) (#26705) 2026-04-28 20:10:42 -07:00