ID CVE-2018-5711
Summary 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.
References
Vulnerable Configurations
  • PHP 5.6.32
    cpe:2.3:a:php:php:5.6.32
  • PHP 7.0.0
    cpe:2.3:a:php:php:7.0.0
  • PHP 7.0.1
    cpe:2.3:a:php:php:7.0.1
  • PHP 7.0.2
    cpe:2.3:a:php:php:7.0.2
  • PHP 7.0.3
    cpe:2.3:a:php:php:7.0.3
  • PHP 7.0.4
    cpe:2.3:a:php:php:7.0.4
  • PHP 7.0.5
    cpe:2.3:a:php:php:7.0.5
  • PHP 7.0.6
    cpe:2.3:a:php:php:7.0.6
  • PHP 7.0.7
    cpe:2.3:a:php:php:7.0.7
  • PHP 7.0.8
    cpe:2.3:a:php:php:7.0.8
  • PHP 7.0.9
    cpe:2.3:a:php:php:7.0.9
  • PHP 7.0.10
    cpe:2.3:a:php:php:7.0.10
  • PHP 7.0.11
    cpe:2.3:a:php:php:7.0.11
  • PHP 7.0.12
    cpe:2.3:a:php:php:7.0.12
  • PHP 7.0.13
    cpe:2.3:a:php:php:7.0.13
  • PHP 7.0.14
    cpe:2.3:a:php:php:7.0.14
  • PHP 7.0.15
    cpe:2.3:a:php:php:7.0.15
  • PHP 7.0.16
    cpe:2.3:a:php:php:7.0.16
  • PHP 7.0.17
    cpe:2.3:a:php:php:7.0.17
  • PHP 7.0.18
    cpe:2.3:a:php:php:7.0.18
  • PHP 7.0.19
    cpe:2.3:a:php:php:7.0.19
  • PHP 7.0.20
    cpe:2.3:a:php:php:7.0.20
  • PHP 7.0.21
    cpe:2.3:a:php:php:7.0.21
  • PHP 7.0.22
    cpe:2.3:a:php:php:7.0.22
  • PHP 7.0.23
    cpe:2.3:a:php:php:7.0.23
  • PHP 7.0.24
    cpe:2.3:a:php:php:7.0.24
  • PHP 7.0.25
    cpe:2.3:a:php:php:7.0.25
  • PHP 7.0.26
    cpe:2.3:a:php:php:7.0.26
  • PHP 7.1.1
    cpe:2.3:a:php:php:7.1.1
  • PHP 7.1.2
    cpe:2.3:a:php:php:7.1.2
  • PHP 7.1.3
    cpe:2.3:a:php:php:7.1.3
  • PHP 7.1.4
    cpe:2.3:a:php:php:7.1.4
  • PHP 7.1.5
    cpe:2.3:a:php:php:7.1.5
  • PHP 7.1.6
    cpe:2.3:a:php:php:7.1.6
  • PHP 7.1.7
    cpe:2.3:a:php:php:7.1.7
  • PHP 7.1.8
    cpe:2.3:a:php:php:7.1.8
  • PHP 7.1.9
    cpe:2.3:a:php:php:7.1.9
  • PHP 7.1.10
    cpe:2.3:a:php:php:7.1.10
  • PHP 7.1.11
    cpe:2.3:a:php:php:7.1.11
  • PHP 7.1.12
    cpe:2.3:a:php:php:7.1.12
  • PHP 7.2.0
    cpe:2.3:a:php:php:7.2.0
  • Debian Linux 7.0
    cpe:2.3:o:debian:debian_linux:7.0
  • Debian Linux 8.0 (Jessie)
    cpe:2.3:o:debian:debian_linux:8.0
  • Canonical Ubuntu Linux 14.04 LTS (Long-Term Support)
    cpe:2.3:o:canonical:ubuntu_linux:14.04:-:-:-:lts
  • Canonical Ubuntu Linux 16.04 LTS (Long-Term Support)
    cpe:2.3:o:canonical:ubuntu_linux:16.04:-:-:-:lts
  • Canonical Ubuntu Linux 18.04 LTS Edition
    cpe:2.3:o:canonical:ubuntu_linux:18.04:-:-:-:lts
CVSS
Base: 4.3
Impact:
Exploitability:
CWE CWE-400
CAPEC
  • XML Ping of the Death
    An attacker initiates a resource depletion attack where a large number of small XML messages are delivered at a sufficiently rapid rate to cause a denial of service or crash of the target. Transactions such as repetitive SOAP transactions can deplete resources faster than a simple flooding attack because of the additional resources used by the SOAP protocol and the resources necessary to process SOAP messages. The transactions used are immaterial as long as they cause resource utilization on the target. In other words, this is a normal flooding attack augmented by using messages that will require extra processing on the target.
  • XML Entity Expansion
    An attacker submits an XML document to a target application where the XML document uses nested entity expansion to produce an excessively large output XML. XML allows the definition of macro-like structures that can be used to simplify the creation of complex structures. However, this capability can be abused to create excessive demands on a processor's CPU and memory. A small number of nested expansions can result in an exponential growth in demands on memory.
  • Inducing Account Lockout
    An attacker leverages the security functionality of the system aimed at thwarting potential attacks to launch a denial of service attack against a legitimate system user. Many systems, for instance, implement a password throttling mechanism that locks an account after a certain number of incorrect log in attempts. An attacker can leverage this throttling mechanism to lock a legitimate user out of their own account. The weakness that is being leveraged by an attacker is the very security feature that has been put in place to counteract attacks.
  • Violating Implicit Assumptions Regarding XML Content (aka XML Denial of Service (XDoS))
    XML Denial of Service (XDoS) can be applied to any technology that utilizes XML data. This is, of course, most distributed systems technology including Java, .Net, databases, and so on. XDoS is most closely associated with web services, SOAP, and Rest, because remote service requesters can post malicious XML payloads to the service provider designed to exhaust the service provider's memory, CPU, and/or disk space. The main weakness in XDoS is that the service provider generally must inspect, parse, and validate the XML messages to determine routing, workflow, security considerations, and so on. It is exactly these inspection, parsing, and validation routines that XDoS targets. There are three primary attack vectors that XDoS can navigate Target CPU through recursion: attacker creates a recursive payload and sends to service provider Target memory through jumbo payloads: service provider uses DOM to parse XML. DOM creates in memory representation of XML document, but when document is very large (for example, north of 1 Gb) service provider host may exhaust memory trying to build memory objects. XML Ping of death: attack service provider with numerous small files that clog the system. All of the above attacks exploit the loosely coupled nature of web services, where the service provider has little to no control over the service requester and any messages the service requester sends.
nessus via4
  • NASL family Debian Local Security Checks
    NASL id DEBIAN_DLA-1651.NASL
    description Several issues in libgd2, a graphics library that allows to quickly draw images, have been found. CVE-2019-6977 A potential double free in gdImage*Ptr() has been reported by Solmaz Salimi (aka. Rooney). CVE-2019-6978 Simon Scannell found a heap-based buffer overflow, exploitable with crafted image data. CVE-2018-1000222 A new double free vulnerabilities in gdImageBmpPtr() has been reported by Solmaz Salimi (aka. Rooney). CVE-2018-5711 Due to an integer signedness error the GIF core parsing function can enter an infinite loop. This will lead to a Denial of Service and exhausted server resources. For Debian 8 'Jessie', these problems have been fixed in version 2.1.0-5+deb8u12. We recommend that you upgrade your libgd2 packages. NOTE: Tenable Network Security has extracted the preceding description block directly from the DLA security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2019-01-31
    plugin id 121483
    published 2019-01-31
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=121483
    title Debian DLA-1651-1 : libgd2 security update
  • NASL family SuSE Local Security Checks
    NASL id SUSE_SU-2018-0260-1.NASL
    description This update for gd fixes one issues. This security issue was fixed : - CVE-2018-5711: Prevent integer signedness error that could have lead to an infinite loop via a crafted GIF file allowing for DoS (bsc#1076391) Note that Tenable Network Security has extracted the preceding description block directly from the SUSE security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2018-12-01
    plugin id 106470
    published 2018-01-30
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=106470
    title SUSE SLED12 / SLES12 Security Update : gd (SUSE-SU-2018:0260-1)
  • NASL family Fedora Local Security Checks
    NASL id FEDORA_2018-331AF74020.NASL
    description Fix CVE-2018-5711 - Potential infinite loop in gdImageCreateFromGifCtx Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2018-04-05
    plugin id 108836
    published 2018-04-05
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=108836
    title Fedora 26 : gd (2018-331af74020)
  • NASL family SuSE Local Security Checks
    NASL id SUSE_SU-2018-0216-1.NASL
    description This update for php5 fixes several issues. These security issues were fixed : - CVE-2018-5712: Prevent reflected XSS on the PHAR 404 error page via the URI of a request for a .phar file that allowed for information disclosure (bsc#1076220) - CVE-2018-5711: Prevent integer signedness error that could have lead to an infinite loop via a crafted GIF file allowing for DoS (bsc#1076391) Note that Tenable Network Security has extracted the preceding description block directly from the SUSE security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2019-01-02
    plugin id 120013
    published 2019-01-02
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=120013
    title SUSE SLES12 Security Update : php5 (SUSE-SU-2018:0216-1)
  • NASL family SuSE Local Security Checks
    NASL id OPENSUSE-2018-119.NASL
    description This update for php7 fixes several issues. These security issues were fixed : - CVE-2018-5712: Prevent reflected XSS on the PHAR 404 error page via the URI of a request for a .phar file that allowed for information disclosure (bsc#1076220). - CVE-2018-5711: Prevent integer signedness error that could have lead to an infinite loop via a crafted GIF file allowing for DoS (bsc#1076391) This update was imported from the SUSE:SLE-12:Update update project.
    last seen 2019-02-21
    modified 2018-06-28
    plugin id 106550
    published 2018-02-01
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=106550
    title openSUSE Security Update : php7 (openSUSE-2018-119)
  • NASL family Slackware Local Security Checks
    NASL id SLACKWARE_SSA_2018-034-01.NASL
    description New php packages are available for Slackware 14.0, 14.1, 14.2, and -current to fix security issues.
    last seen 2018-09-02
    modified 2018-06-28
    plugin id 106586
    published 2018-02-05
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=106586
    title Slackware 14.0 / 14.1 / 14.2 / current : php (SSA:2018-034-01)
  • NASL family SuSE Local Security Checks
    NASL id OPENSUSE-2018-109.NASL
    description This update for gd fixes one issues. This security issue was fixed : - CVE-2018-5711: Prevent integer signedness error that could have lead to an infinite loop via a crafted GIF file allowing for DoS (bsc#1076391) This update was imported from the SUSE:SLE-12:Update update project.
    last seen 2019-02-21
    modified 2018-02-12
    plugin id 106543
    published 2018-02-01
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=106543
    title openSUSE Security Update : gd (openSUSE-2018-109)
  • NASL family Debian Local Security Checks
    NASL id DEBIAN_DLA-1248.NASL
    description It was discovered that there was a denial of service attack in the libgd2 image library. A corrupt file could have exploited a signedness confusion leading to an infinite loop. For Debian 7 'Wheezy', this issue has been fixed in libgd2 version 2.0.36~rc1~dfsg-6.1+deb7u11. We recommend that you upgrade your libgd2 packages. NOTE: Tenable Network Security has extracted the preceding description block directly from the DLA security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2018-07-09
    plugin id 106175
    published 2018-01-19
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=106175
    title Debian DLA-1248-1 : libgd2 security update
  • NASL family SuSE Local Security Checks
    NASL id SUSE_SU-2018-0806-1.NASL
    description This update for php53 fixes several issues. These security issues were fixed : - CVE-2016-10712: In PHP all of the return values of stream_get_meta_data could be controlled if the input can be controlled (e.g., during file uploads). (bsc#1080234) - CVE-2018-5712: Prevent reflected XSS on the PHAR 404 error page via the URI of a request for a .phar file that allowed for information disclosure (bsc#1076220) - CVE-2018-5711: Prevent integer signedness error that could have lead to an infinite loop via a crafted GIF file allowing for DoS (bsc#1076391) - CVE-2016-5773: php_zip.c in the zip extension in PHP improperly interacted with the unserialize implementation and garbage collection, which allowed remote attackers to execute arbitrary code or cause a denial of service (use-after-free and application crash) via crafted serialized data containing a ZipArchive object. (bsc#986247) - CVE-2016-5771: spl_array.c in the SPL extension in PHP improperly interacted with the unserialize implementation and garbage collection, which allowed remote attackers to execute arbitrary code or cause a denial of service (use-after-free and application crash) via crafted serialized data. (bsc#986391) - CVE-2018-7584: Fixed stack-based buffer under-read while parsing an HTTPresponse in the php_stream_url_wrap_http_ex. (bsc#1083639) Note that Tenable Network Security has extracted the preceding description block directly from the SUSE security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2018-12-01
    plugin id 108650
    published 2018-03-27
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=108650
    title SUSE SLES11 Security Update : php53 (SUSE-SU-2018:0806-1)
  • NASL family SuSE Local Security Checks
    NASL id OPENSUSE-2018-99.NASL
    description This update for php5 fixes several issues. These security issues were fixed : - CVE-2018-5712: Prevent reflected XSS on the PHAR 404 error page via the URI of a request for a .phar file that allowed for information disclosure (bsc#1076220) - CVE-2018-5711: Prevent integer signedness error that could have lead to an infinite loop via a crafted GIF file allowing for DoS (bsc#1076391) This update was imported from the SUSE:SLE-12:Update update project.
    last seen 2019-02-21
    modified 2018-06-28
    plugin id 106434
    published 2018-01-29
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=106434
    title openSUSE Security Update : php5 (openSUSE-2018-99)
  • NASL family Fedora Local Security Checks
    NASL id FEDORA_2018-BA81E4E4A0.NASL
    description Fix CVE-2018-5711 - Potential infinite loop in gdImageCreateFromGifCtx Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2018-03-29
    plugin id 108700
    published 2018-03-29
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=108700
    title Fedora 27 : gd (2018-ba81e4e4a0)
  • NASL family SuSE Local Security Checks
    NASL id SUSE_SU-2018-0308-1.NASL
    description This update for php7 fixes several issues. These security issues were fixed : - CVE-2018-5712: Prevent reflected XSS on the PHAR 404 error page via the URI of a request for a .phar file that allowed for information disclosure (bsc#1076220). - CVE-2018-5711: Prevent integer signedness error that could have lead to an infinite loop via a crafted GIF file allowing for DoS (bsc#1076391) Note that Tenable Network Security has extracted the preceding description block directly from the SUSE security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2019-01-02
    plugin id 120015
    published 2019-01-02
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=120015
    title SUSE SLES12 Security Update : php7 (SUSE-SU-2018:0308-1)
  • NASL family Ubuntu Local Security Checks
    NASL id UBUNTU_USN-3755-1.NASL
    description It was discovered that GD incorrectly handled certain images. An attacker could possibly use this issue to execute arbitrary code. (CVE-2018-1000222) It was discovered that GD incorrectly handled certain GIF files. An attacker could possibly use this issue to cause a denial of service. (CVE-2018-5711). Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2018-12-01
    plugin id 112150
    published 2018-08-28
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=112150
    title Ubuntu 14.04 LTS / 16.04 LTS / 18.04 LTS : libgd2 vulnerabilities (USN-3755-1)
  • NASL family SuSE Local Security Checks
    NASL id SUSE_SU-2018-0235-1.NASL
    description This update for gd fixes several issues. This security issue was fixed : - CVE-2018-5711: Prevent integer signedness error that could have lead to an infinite loop via a crafted GIF file allowing for DoS (bsc#1076391) The update package also includes non-security fixes. See advisory for details. Note that Tenable Network Security has extracted the preceding description block directly from the SUSE security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2018-12-01
    plugin id 106439
    published 2018-01-29
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=106439
    title SUSE SLES11 Security Update : gd (SUSE-SU-2018:0235-1)
  • NASL family Fedora Local Security Checks
    NASL id FEDORA_2018-1AEAC808CE.NASL
    description Fix CVE-2018-5711 - Potential infinite loop in gdImageCreateFromGifCtx Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2019-01-03
    plugin id 120264
    published 2019-01-03
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=120264
    title Fedora 28 : gd (2018-1aeac808ce)
  • NASL family Amazon Linux Local Security Checks
    NASL id ALA_ALAS-2018-946.NASL
    description Reflected XSS in .phar 404 page An issue was discovered in PHP; there is Reflected XSS on the PHAR 404 error page via the URI of a request for a .phar file. (CVE-2018-5712) Denial of Service (DoS) via infinite loop in libgd gdImageCreateFromGifCtx function in ext/gd/libgd/gd_gif_in.c The gd_gif_in.c file in the GD Graphics Library (aka libgd), as used in PHP 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. (CVE-2018-5711)
    last seen 2019-02-21
    modified 2018-06-28
    plugin id 106691
    published 2018-02-09
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=106691
    title Amazon Linux AMI : php56 / php70,php71 (ALAS-2018-946)
redhat via4
advisories
rhsa
id RHSA-2018:1296
refmap via4
confirm
gentoo GLSA-201903-18
mlist
  • [debian-lts-announce] 20180119 [SECURITY] [DLA 1248-1] libgd2 security update
  • [debian-lts-announce] 20190130 [SECURITY] [DLA 1651-1] libgd2 security update
ubuntu USN-3755-1
Last major update 16-01-2018 - 04:29
Published 16-01-2018 - 04:29
Last modified 03-04-2019 - 07:38
Back to Top