跳到正文

php-fpm远程代码执行漏洞

高危 已验证 漏洞情报EXP 公开

漏洞描述

PHP是一种在服务器端执行的嵌入HTML文档的脚本语言。基于PHP-CGI的设置在解析PHP文件查询字符串参数时存在一个漏洞,允许远程攻击者可以利用漏洞执行任意代码。当使用PHP-CGI设置时(如Apache mod_cgid模块),php-cgi接收查询字符串作为命令行参数,这些参数允许命令行开关如-s, -d或-c传递给php-cgi进程,可被利用泄露源代码或执行任意代码。如-s命令,允许攻击者获取index.php的源代码:http://localhost/index.php?-s其中Apache mod_php和nginx php-fpm不受此漏洞影响。

解决建议

PHP 5.4.2和5.3.12已经修复此漏洞,建议用户下载使用:http://www.php.net/archive/2012.php#id2012-05-03-1

参考链接

http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/
http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?objectID=c03360041
http://lists.apple.com/archives/security-announce/2012/Sep/msg00004.html
http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00002.html
http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00007.html
http://lists.opensuse.org/opensuse-security-announce/2012-05/msg00011.html
http://marc.info/?l=bugtraq&m=134012830914727&w=2
http://rhn.redhat.com/errata/RHSA-2012-0546.html
http://rhn.redhat.com/errata/RHSA-2012-0547.html
http://rhn.redhat.com/errata/RHSA-2012-0568.html
http://rhn.redhat.com/errata/RHSA-2012-0569.html
http://rhn.redhat.com/errata/RHSA-2012-0570.html
http://secunia.com/advisories/49014
http://secunia.com/advisories/49065
http://secunia.com/advisories/49085
http://secunia.com/advisories/49087
http://support.apple.com/kb/HT5501
http://www.debian.org/security/2012/dsa-2465
http://www.kb.cert.org/vuls/id/520827
http://www.kb.cert.org/vuls/id/673343
http://www.mandriva.com/security/advisories?name=MDVSA-2012:068
http://www.php.net/archive/2012.php#id2012-05-03-1
http://www.php.net/ChangeLog-5.php#5.4.2
http://www.securitytracker.com/id?1027022
https://bugs.php.net/bug.php?id=61910
https://bugs.php.net/patch-display.php?bug_id=61910&patch=cgi.diff&revision=1335984315&display=1