严重 Nginx配置失误 path_info 解析漏洞导致PHP任意代码执行(CVE-2013-4547)

CVE编号

CVE-2013-4547

利用情况

EXP 已公开

补丁情况

官方补丁

披露时间

2013-11-24
该漏洞EXP已公开传播,漏洞利用成本极低,建议您立即关注并修复。
漏洞描述
nginx是一款高性能的web服务器,使用非常广泛,其不仅经常被用作反向代理,也可以非常好的支持PHP的运行。

nginx中HTTP请求解析器在处理包含未转义空格字符的URI时存在安全漏洞,允许远程攻击者利用漏洞绕过某些配置中的安全限制。
如可以绕过如下配置的URL访问限制:
location /protected/ {
deny all;
}
通过请求"/foo /../protected/file"(静态文件,但foo后面有一个空格结尾)或采用如下配置:

location ~ \.php$ {
fastcgi_pass ...
}
通过请求"/file \0.php"可绕过限制,未授权访问受限资源。
解决建议
Nginx 1.5.7, 1.4.4已经修复该漏洞,建议用户下载更新:
http://www.nginx.org
受影响软件情况
# 类型 厂商 产品 版本 影响面
1
运行在以下环境
应用 nginx nginx * From
(including)
0.8.41
Up to
(excluding)
1.4.4
运行在以下环境
应用 nginx nginx * From
(including)
1.5.0
Up to
(including)
1.5.6
运行在以下环境
应用 suse lifecycle_management_server 1.3 -
运行在以下环境
应用 suse studio_onsite 1.3 -
运行在以下环境
应用 suse webyast 1.3 -
运行在以下环境
系统 amazon linux_AMI nginx * Up to
(excluding)
1.4.3-1.14.amzn1
运行在以下环境
系统 amazon_AMI nginx * Up to
(excluding)
1.4.3-1.14.amzn1
运行在以下环境
系统 debian_10 nginx * Up to
(excluding)
1.4.4-1
运行在以下环境
系统 debian_11 nginx * Up to
(excluding)
1.4.4-1
运行在以下环境
系统 debian_12 nginx * Up to
(excluding)
1.4.4-1
运行在以下环境
系统 debian_7 nginx * Up to
(excluding)
1.2.1-2.2+wheezy2
运行在以下环境
系统 fedora_EPEL_5 nginx * Up to
(excluding)
0.8.55-6.el5
运行在以下环境
系统 fedora_EPEL_6 nginx * Up to
(excluding)
1.0.15-11.el6
运行在以下环境
系统 opensuse opensuse 11.4 -
运行在以下环境
系统 opensuse opensuse 12.2 -
运行在以下环境
系统 opensuse opensuse 12.3 -
运行在以下环境
系统 opensuse opensuse 13.1 -
运行在以下环境
系统 ubuntu_12.04.5_lts nginx * Up to
(excluding)
1.1.19-1ubuntu0.5
运行在以下环境
系统 ubuntu_12.04_lts nginx * Up to
(excluding)
1.1.19-1ubuntu0.5
阿里云评分
9.4
  • 攻击路径
    远程
  • 攻击复杂度
    容易
  • 权限要求
    无需权限
  • 影响范围
    全局影响
  • EXP成熟度
    EXP 已公开
  • 补丁情况
    官方补丁
  • 数据保密性
    数据泄露
  • 数据完整性
    传输被破坏
  • 服务器危害
    服务器失陷
  • 全网数量
    N/A
CWE-ID 漏洞类型
CWE-116 对输出编码和转义不恰当
阿里云安全产品覆盖情况