Skip to content
OpenAdvisories
Unscored Public exploit CVE-2018-5711 EUVD-2018-17480GHSA-qwqg-rff2-45cw

gd_gif_in.c in the GD Graphics Library (aka libgd), as used in PHP before 5.6.33, 7.0.x before 7.0.27, 7.1.x before 7.1.13, and 7.2.x befor…

Published Jan 16, 2018 · Updated Aug 5, 2024 · Assigned by mitre

Description

gd_gif_in.c in the GD Graphics Library (aka libgd), as used in PHP before 5.6.33, 7.0.x before 7.0.27, 7.1.x before 7.1.13, and 7.2.x before 7.2.1, has an integer signedness error that leads to an infinite loop via a crafted GIF file, as demonstrated by a call to the imagecreatefromgif or imagecreatefromstring PHP function. This is related to GetCode_ and gdImageCreateFromGifCtx.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libgd2 2.2.5-4.1 —
Debian 13 libgd2 2.2.5-4.1 —
Debian 12 libgd2 2.2.5-4.1 —
Debian 9 php7.0 7.0.27-0+deb9u1 DSA-4080-1
Debian 8 libgd2 2.1.0-5+deb8u12 DLA-1651-1
Debian 8 php5 5.6.33+dfsg-0+deb8u1 DSA-4081-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Debian 7 libgd2 2.0.36~rc1~dfsg-6.1+deb7u11 DLA-1248-1
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS libgd2 2.2.5-4ubuntu0.2 USN-3755-1
Ubuntu 16.04 LTS libgd2 2.1.1-4ubuntu0.16.04.10 USN-3755-1
Ubuntu 14.04 LTS libgd2 2.1.0-3ubuntu0.10 USN-3755-1
ReleasePackageFixed inAdvisory
RHEL 3 rh-php70-php +29 7.0.27-1.el6 RHSA-2018:1296
RHEL 3 rh-php71-php +27 7.1.30-1.el7 RHSA-2019:2519
ReleasePackageFixed inAdvisory
SLES 12 SP3 gd 2.1.0-24.6.1 SUSE-SU-2018:0260-1
SLES 12 SP3 php5 5.5.14-109.17.1 SUSE-SU-2018:0216-1
SLES 12 SP3 php7 7.0.7-50.26.1 SUSE-SU-2018:0308-1
SLES 12 SP2 gd 2.1.0-24.6.1 SUSE-SU-2018:0260-1
SLES 12 SP2 php5 5.5.14-109.17.1 SUSE-SU-2018:0216-1
SLES 12 SP2 php7 7.0.7-50.26.1 SUSE-SU-2018:0308-1
SLES 12 php5 5.5.14-109.17.1 SUSE-SU-2018:0216-1
SLES 12 php7 7.0.7-50.26.1 SUSE-SU-2018:0308-1
SLES 11 SP4 gd 2.0.36.RC1-52.33.5.1 SUSE-SU-2018:0235-1
SLES 11 SP4 php53 5.3.17-112.20.1 SUSE-SU-2018:0806-1
SLES 11 SP3 php53 5.3.17-112.20.1 SUSE-SU-2018:0806-1
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 12 SP3 gd 2.1.0-24.6.1 SUSE-SU-2018:0260-1
SLES for SAP 12 SP2 gd 2.1.0-24.6.1 SUSE-SU-2018:0260-1
SLES for SAP 11 SP4 gd 2.0.36.RC1-52.33.5.1 SUSE-SU-2018:0235-1
SLES for SAP 11 SP4 php53 5.3.17-112.20.1 SUSE-SU-2018:0806-1
SUSE Linux Enterprise Point of Sale 11 SP3 php53 5.3.17-112.20.1 SUSE-SU-2018:0806-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed gd 2.3.3-1.1 openSUSE-SU-2024:10777-1
ReleasePackageFixed inAdvisory
Alpine v3.24 gd 2.2.5-r2 —
Alpine v3.23 gd 2.2.5-r2 —
Alpine v3.22 gd 2.2.5-r2 —
Alpine v3.21 gd 2.2.5-r2 —
Alpine v3.20 gd 2.2.5-r2 —
Show 16 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 gd 2.2.5-r2 —
Alpine v3.18 gd 2.2.5-r2 —
Alpine v3.17 gd 2.2.5-r2 —
Alpine v3.16 gd 2.2.5-r2 —
Alpine v3.15 gd 2.2.5-r2 —
Alpine v3.14 gd 2.2.5-r2 —
Alpine v3.13 gd 2.2.5-r2 —
Alpine v3.12 gd 2.2.5-r2 —
Alpine v3.11 gd 2.2.5-r2 —
Alpine v3.10 gd 2.2.5-r2 —
Alpine v3.9 gd 2.2.5-r2 —
Alpine v3.8 gd 2.2.5-r2 —
Alpine v3.8 php5 5.6.33-r0 —
Alpine v3.7 gd 2.2.5-r2 —
Alpine v3.7 php5 5.6.33-r0 —
Alpine v3.7 php7 7.1.13-r0 —
Alpine v3.6 gd 2.2.5-r2 —
Alpine v3.6 php5 5.6.33-r0 —
Alpine v3.6 php7 7.1.13-r0 —
Alpine v3.5 php5 5.6.33-r0 —
Alpine v3.5 php7 7.0.27-r0 —
Alpine v3.4 php5 5.6.33-r0 —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 2 repositories

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Advisories 14

References