Repository navigation
fastcgi: fix HTTPoxy vulnerability - #7934
Conversation
Added HTTPoxy mitigation to prevent trusting client-supplied Proxy header for HTTP_PROXY environment variable. Signed-off-by: bzyy1024 <972702550@qq.com>
Add test to ensure HTTPoxy vulnerability is mitigated by dropping client-supplied Proxy headers. Signed-off-by: bzyy1024 <972702550@qq.com>
|
Hi @mholt, I've added tests for this PR. Could you please take a look when you have a moment? |
|
Thanks, just need to format the file using |
|
@mholt Thanks for the quick review! I've run gofmt and pushed the formatted code. Appreciate the guidance on my first contribution. |
|
Just a quick note that we need an Assistance Disclosure. |
|
Assistance Disclosure: This contribution was prepared with the assistance of an AI coding assistant (CodeBuddy, powered by Deepseek-V4-Pro) in the following ways:
All changes have been reviewed, understood, and tested by the human author (bzyy1024). No code was committed without human verification. |
steadytao
left a comment
There was a problem hiding this comment.
Resolves the vulnerability. LGTM. Thank you.
|
Will let Matt merge this one as he was the original reviewer. |
|
Thanks both! Changes are in and all set on my side. |
Added HTTPoxy mitigation to prevent trusting client-supplied Proxy header for setting HTTP_PROXY environment variable.
The FastCGI transport was passing all HTTP headers to backend applications as environment variables, including the client-controlled Proxy header. This allows attackers to set the HTTP_PROXY environment variable in the backend's environment, hijacking outbound HTTP requests made by backend applications.
Assistance Disclosure:
This contribution was prepared with the assistance of an AI coding assistant (CodeBuddy, powered by Deepseek-V4-Pro) in the following ways:
gofmtformatting and merging the latest upstreammasterinto the branchAll changes have been reviewed, understood, and tested by the human author (bzyy1024). No code was committed without human verification.