cve.bz

CVE-2018-5711 Infinite Loop

5.5 mediumEPSS 13%Fix available

Medium (5.5). EPSS 13% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.0

5.5 medium
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
EPSS
13% (unchanged from 13% a week ago; 13% 30 days ago) estimated probability of exploitation activity in the next 30 days; 96th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-681 Incorrect Conversion between Numeric Types
CWE-835 Loop with Unreachable Exit Condition (Infinite Loop)
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2018-5711 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2018-5711?via=ask-ai-copy and https://cve.bz/cve/CVE-2018-5711?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2018-5711 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
php:phpthrough 5.6.32
php:phpfrom 7.0.0 through 7.0.26
php:phpafter 7.1.0 through 7.1.12
php:php7.2.0
debian:debian_linux7.0
debian:debian_linux8.0
canonical:ubuntu_linux14.04
canonical:ubuntu_linux16.04
canonical:ubuntu_linux18.04

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian7libgd22.0.36~rc1~dfsg-6.1+deb7u11DLA-1248-1
Debian8libgd22.1.0-5+deb8u12DLA-1651-1
Debian8php55.6.33+dfsg-0+deb8u1DSA-4081-1
Debian9php7.07.0.27-0+deb9u1DSA-4080-1
Debian12, 13, 14libgd22.2.5-4.1DEBIAN-CVE-2018-5711
Ubuntu14.04:LTSlibgd22.1.0-3ubuntu0.10UBUNTU-CVE-2018-5711 USN-3755-1
Ubuntu16.04:LTSlibgd22.1.1-4ubuntu0.16.04.10UBUNTU-CVE-2018-5711 USN-3755-1
Ubuntu18.04:LTSlibgd22.2.5-4ubuntu0.2UBUNTU-CVE-2018-5711 USN-3755-1
Red Hatrhel_software_collections:3::el6rh-php70-php, rh-php70-php-gd, rh-php70-php-cli and 29 more0:7.0.27-1.el6RHSA-2018:1296
Red Hatrhel_software_collections:3::el7rh-php70-php, rh-php70-php-gd, rh-php70-php-cli and 27 more0:7.0.27-1.el7RHSA-2018:1296
Red Hatrhel_software_collections:3::el7rh-php71-php, rh-php71-php-gd, rh-php71-php-cli and 27 more0:7.1.30-1.el7RHSA-2019:2519
SUSELinux Enterprise Desktop 12 SP2, Linux Enterprise Desktop 12 SP3, Linux Enterprise Server 12 SP2 and 8 moregd2.1.0-24.6.1SUSE-SU-2018:0260-1
SUSELinux Enterprise Module for Web and Scripting 12, Linux Enterprise Software Development Kit 12 SP2, Linux Enterprise Software Development Kit 12 SP3php55.5.14-109.17.1SUSE-SU-2018:0216-1
SUSELinux Enterprise Module for Web and Scripting 12, Linux Enterprise Software Development Kit 12 SP2, Linux Enterprise Software Development Kit 12 SP3php77.0.7-50.26.1SUSE-SU-2018:0308-1
SUSELinux Enterprise Point of Sale 11 SP3, Linux Enterprise Server 11 SP3-LTSS, Linux Enterprise Server 11 SP3-TERADATA and 3 morephp535.3.17-112.20.1SUSE-SU-2018:0806-1
SUSELinux Enterprise Server 11 SP4, Linux Enterprise Server for SAP Applications 11 SP4, Linux Enterprise Software Development Kit 11 SP4gd2.0.36.RC1-52.33.5.1SUSE-SU-2018:0235-1
openSUSETumbleweedgd2.3.3-1.1openSUSE-SU-2024:10777-1
Alpinev3.4, v3.5, v3.6 and 2 morephp55.6.33-r0ALPINE-CVE-2018-5711
Alpinev3.5php77.0.27-r0ALPINE-CVE-2018-5711
Alpinev3.6, v3.7php77.1.13-r0ALPINE-CVE-2018-5711
Alpinev3.6, v3.7, v3.8 and 16 moregd2.2.5-r2ALPINE-CVE-2018-5711

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Low.

Red Hat's statement

This vulnerability is rated as low severity because it causes an infinite loop, resulting in a denial of service, while it can exhaust server resources and impact availability, it does not pose a threat to system security or integrity.

ProductPackageStateAdvisory
Red Hat Software Collections for Red Hat Enterprise Linux 6rh-php70-php-0:7.0.27-1.el6Fixed 2018-05-03RHSA-2018:1296
Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUSrh-php70-php-0:7.0.27-1.el6Fixed 2018-05-03RHSA-2018:1296
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-php70-php-0:7.0.27-1.el7Fixed 2018-05-03RHSA-2018:1296
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-php71-php-0:7.1.30-1.el7Fixed 2019-08-19RHSA-2019:2519
Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUSrh-php70-php-0:7.0.27-1.el7Fixed 2018-05-03RHSA-2018:1296
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUSrh-php70-php-0:7.0.27-1.el7Fixed 2018-05-03RHSA-2018:1296
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUSrh-php71-php-0:7.1.30-1.el7Fixed 2019-08-19RHSA-2019:2519
Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUSrh-php70-php-0:7.0.27-1.el7Fixed 2018-05-03RHSA-2018:1296
Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUSrh-php71-php-0:7.1.30-1.el7Fixed 2019-08-19RHSA-2019:2519
Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUSrh-php71-php-0:7.1.30-1.el7Fixed 2019-08-19RHSA-2019:2519
Red Hat Enterprise Linux 5libwmfNot affected
Red Hat Enterprise Linux 5phpWill not fix
Red Hat Enterprise Linux 5php53Will not fix
Red Hat Enterprise Linux 6gdOut of support scope
Red Hat Enterprise Linux 6libwmfNot affected
Red Hat Enterprise Linux 6phpWill not fix
Red Hat Enterprise Linux 7gdFix deferred
Red Hat Enterprise Linux 7libwmfNot affected
Red Hat Enterprise Linux 7phpWill not fix
Red Hat Enterprise Linux 8gdFix deferred
2 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2018-5711.

References

Check your stackJSON