Translated message

A translation of this page exists in English.

HTTPoxy - 我的 nginx 会受影响吗?

Solution Verified - Updated -

Environment

Red Hat Software Collections for Red Hat Enterprise Linux 6 and 7

Issue

如果您在 CGI 中使用 PHP、Python 或 Go 时,则会受这个问题影响。Nginx 在其默认配置中不支持 CGI,但很多用户采用如下解决方案,即使用 simplecgi 或者 fcgiwrap,通过内置 FastCGI 支持提供此功能。

如果您的 CGI 脚本为另一个服务打开 HTTP 连接,所有攻击者原始请求生成的传出请求都会被依次重新指向攻击者控制的代理服务器。

Resolution

要在 Nginx 配置中防止这个问题,请在您的 fastcgi 环境中添加以下行(一般是在 /etc/nginx/fastcgi_params 文件中):

    fastcgi_param  HTTP_PROXY  "";

有关 fastcgi_param 配置指令的详情请查看 NGinx - Fast CGI 模块

Root Cause

详情请查看 HTTPoxy - CGI "HTTP_PROXY" 变量名冲突

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments