低危 PHP up to 5.6.32/7.0.26/7.1.12/7.2.0 GD Graphics Library gd_gif_in.c imagecreatefromgif/imagecreatefromstring Infinite Loop 拒绝服务漏洞

CVE编号

CVE-2018-5711

利用情况

POC 已公开

补丁情况

官方补丁

披露时间

2018-01-16
漏洞描述
PHP 5.6.33之前,7.0.x-7.0.27, 7.1.x-7.1.13 版本使用的GD图像处理库下gd_gif_in.c文件GetCode_ 和gdImageCreateFromGifCtx函数存在 整数符号错误,直接导致了在处理攻击者特质的GIF文件时进入死循环。此问题已经由安全研究者通过调用imagecreatefromgif或imagecreatefromstring函数演示了PoC。

解决建议
目前厂商已发布升级补丁以修复漏洞,补丁获取链接:
http://php.net/downloads.php
受影响软件情况
# 类型 厂商 产品 版本 影响面
1
运行在以下环境
应用 php php * Up to
(including)
5.6.32
运行在以下环境
应用 php php * From
(excluding)
7.1.0
Up to
(including)
7.1.12
运行在以下环境
应用 php php * From
(including)
7.0.0
Up to
(including)
7.0.26
运行在以下环境
应用 php php 7.2.0 -
运行在以下环境
系统 alpine_3.10 gd * Up to
(excluding)
2.2.5-r2
运行在以下环境
系统 alpine_3.11 gd * Up to
(excluding)
2.2.5-r2
运行在以下环境
系统 alpine_3.12 gd * Up to
(excluding)
2.2.5-r2
运行在以下环境
系统 alpine_3.13 gd * Up to
(excluding)
2.2.5-r2
运行在以下环境
系统 alpine_3.14 gd * Up to
(excluding)
2.2.5-r2
运行在以下环境
系统 alpine_3.15 gd * Up to
(excluding)
2.2.5-r2
运行在以下环境
系统 alpine_3.16 gd * Up to
(excluding)
2.2.5-r2
运行在以下环境
系统 alpine_3.17 gd * Up to
(excluding)
2.2.5-r2
运行在以下环境
系统 alpine_3.18 gd * Up to
(excluding)
2.2.5-r2
运行在以下环境
系统 alpine_3.19 gd * Up to
(excluding)
2.2.5-r2
运行在以下环境
系统 alpine_3.4 php5 * Up to
(excluding)
5.6.33-r0
运行在以下环境
系统 alpine_3.5 php5 * Up to
(excluding)
5.6.33-r0
运行在以下环境
系统 alpine_3.6 gd * Up to
(excluding)
2.2.5-r2
运行在以下环境
系统 alpine_3.7 gd * Up to
(excluding)
2.2.5-r2
运行在以下环境
系统 alpine_3.8 gd * Up to
(excluding)
2.2.5-r2
运行在以下环境
系统 alpine_3.9 gd * Up to
(excluding)
2.2.5-r2
运行在以下环境
系统 amazon_2 php * Up to
(excluding)
7.2.2-3.amzn2.0.1
运行在以下环境
系统 amazon_AMI php56 * Up to
(excluding)
7.0.27-1.27.amzn1
运行在以下环境
系统 debian_10 libgd2 * Up to
(excluding)
2.2.5-4.1
运行在以下环境
系统 debian_11 libgd2 * Up to
(excluding)
2.2.5-4.1
运行在以下环境
系统 debian_12 libgd2 * Up to
(excluding)
2.2.5-4.1
运行在以下环境
系统 debian_7 libgd2 * Up to
(excluding)
2.0.36~rc1~dfsg-6.1+deb7u11
运行在以下环境
系统 debian_8 php5 * Up to
(excluding)
5.6.20+dfsg-0+deb8u1
运行在以下环境
系统 debian_9 libgd2 * Up to
(excluding)
7.0.27-0+deb9u1
运行在以下环境
系统 fedora_26 gd * Up to
(excluding)
2.2.5-2.fc26
运行在以下环境
系统 fedora_27 gd * Up to
(excluding)
2.2.5-3.fc27
运行在以下环境
系统 fedora_28 gd * Up to
(excluding)
2.2.5-3.fc28
运行在以下环境
系统 fedora_32 gd * Up to
(excluding)
2.3.0-1.fc32
运行在以下环境
系统 opensuse_Leap_42.2 php5 * Up to
(excluding)
5.5.14-91.2
运行在以下环境
系统 opensuse_Leap_42.3 gd * Up to
(excluding)
2.1.0-24.1
运行在以下环境
系统 suse_11_SP4 gd * Up to
(excluding)
2.0.36.RC1-52.33.5.1
运行在以下环境
系统 suse_12_SP2 gd * Up to
(excluding)
2.1.0-24.6.1
运行在以下环境
系统 suse_12_SP3 gd * Up to
(excluding)
2.1.0-24.6.1
运行在以下环境
系统 ubuntu_14.04 libgd2 * Up to
(excluding)
2.1.0-3ubuntu0.10
运行在以下环境
系统 ubuntu_16.04 libgd2 * Up to
(excluding)
2.1.1-4ubuntu0.16.04.10
运行在以下环境
系统 ubuntu_18.04 libgd2 * Up to
(excluding)
2.2.5-4ubuntu0.2
运行在以下环境
系统 ubuntu_20.04 libgd2 * Up to
(excluding)
2.2.5-4ubuntu1
运行在以下环境
系统 ubuntu_21.04 libgd2 * Up to
(excluding)
2.2.5-4ubuntu1
阿里云评分
2.9
  • 攻击路径
    本地
  • 攻击复杂度
    复杂
  • 权限要求
    无需权限
  • 影响范围
    有限影响
  • EXP成熟度
    POC 已公开
  • 补丁情况
    官方补丁
  • 数据保密性
    无影响
  • 数据完整性
    无影响
  • 服务器危害
    无影响
  • 全网数量
    100
CWE-ID 漏洞类型
CWE-681 数值类型间的不正确转换
CWE-835 不可达退出条件的循环(无限循环)
阿里云安全产品覆盖情况