Repository navigation
[Fix] Extend request body parameter restrictions to cloud provider auth fields #26264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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", | ||
| ] | ||
|
Comment on lines
+154
to
+162
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The PR description claims five per-param rejection checks, but no test cases covering
Comment on lines
+154
to
+162
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| for param in banned_params: | ||
| if ( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
High: SSRF via unbanned aws_bedrock_runtime_endpoint
aws_bedrock_runtime_endpointcontrols the destination URL for all Bedrock API calls (seebase_aws_llm.py:1114-1150). It's functionally equivalent toapi_basefor Bedrock models. An authenticated user can set this in the request body to redirect the proxy's SigV4-signed request to an attacker-controlled server, leaking the operator's AWS credentials.Also missing:
vertex_ai_credentials(alias forvertex_credentials— seevertex_llm_base.py:748-753).