Translated message

A translation of this page exists in English.

Warning message

This translation is outdated. For the most up-to-date information, please refer to the English version.

HTTPoxy - 我的 Apache mod_cgi 会受影响吗?

Solution Verified - Updated -

Environment

Red Hat Enterprise Linux 4.x
Red Hat Enterprise Linux 5.x
Red Hat Enterprise Linux 6.x
Red Hat Enterprise Linux 7.x
Red Hat Software Collections for Red Hat Enterprise Linux 6 and 7
Red Hat JBoss Web Server 1.x
Red Hat JBoss Web Server 2.x
Red Hat JBoss Web Server 3.x
Red Hat JBoss Enterprise Application Platform 5.x
Red Hat JBoss Enterprise Application Platform 6.x

Issue

如果您在 Apache httpd 的 [mod_cgi] 中使用 PHP、Python、Go 及其他语言时,则会受这个问题影响 (https://access.redhat.com/solutions/34735)。如果您的 CGI 脚本为另一个服务打开网络连接,则所有攻击者原始请求生成的传出请求都会被依次重新指向攻击者控制的代理服务器。这样攻击者就可能会看到敏感信息,并使用不正常的时间回复或保持连接开放,从而造成潜在的服务被拒。

Resolution

为解决这个问题,可将 httpd 修改为不要向 CGI 脚本环境导出代理服务器 HTTP 标头值。请参看 HTTPoxy - CGI "HTTP_PROXY" 变量名称冲突 漏洞一文中“解决方案”部分,在该部分中列出了为不同红帽产品提供的 httpd 勘误列表。

另外,还可以通过 httpd 配置解决这个问题,即在以下配置中使用 mod_headers扩展模块。

    RequestHeader unset Proxy

这个设置可让 httpd 中启动 CGI 环境前为传入 HTTP 请求取消代理服务器标头设置。有关 RequestHeader 配置指令的详情请查看 Apache - Mod 标头

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