CVE-2018-5711: Medium severity PHP PHP vulnerability

Published Nov 25, 2017
·
Updated

A flaw was found libgd in PHP that affects all versions. An infinite loop in GD GIF core parsing function that results in a Denial of Service and exhausted the server resources.

References: http://php.net/ChangeLog-5.php#5.6.33 https://bugs.php.net/bug.php?id=75571

Patch: https://bugs.php.net/patch-display.php?bug=75571&patch=fix-75571&revision=1511981663

Other sources

Fixed bug (Potential infinite loop in gdImageCreateFromGifCtx). (CVE-2018-5711)

PHP

gdgifin.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.

Affected Software

18 affected componentsFixes available
redhat/rh-php70-php<0:7.0.27-1.el6
0:7.0.27-1.el6
redhat/rh-php70-php<0:7.0.27-1.el7
0:7.0.27-1.el7
redhat/rh-php71-php<0:7.1.30-1.el7
0:7.1.30-1.el7
redhat/php<5.6.33
5.6.33
redhat/php<7.0.27
7.0.27
redhat/php<7.1.13
7.1.13
redhat/php<7.2.1
7.2.1
PHP PHP<7.0.27
7.0.27
PHP PHP<=5.6.32
PHP PHP>=7.0.0<=7.0.26
PHP PHP>7.1.0<=7.1.12
PHP PHP=7.2.0
Debian Debian Linux=7.0
Debian Debian Linux=8.0
Canonical Ubuntu Linux=14.04
Canonical Ubuntu Linux=16.04
Canonical Ubuntu Linux=18.04
debian/libgd2
2.3.0-22.3.0-2+deb11u12.3.3-92.3.3-13

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/rh-php70-php to a version that resolves this vulnerability.

    Fixed in 0:7.0.27-1.el6
  2. Upgrade

    Upgrade redhat/rh-php70-php to a version that resolves this vulnerability.

    Fixed in 0:7.0.27-1.el7
  3. Upgrade

    Upgrade redhat/rh-php71-php to a version that resolves this vulnerability.

    Fixed in 0:7.1.30-1.el7
  4. Upgrade

    Upgrade redhat/php to a version that resolves this vulnerability.

    Fixed in 5.6.33
  5. Upgrade

    Upgrade redhat/php to a version that resolves this vulnerability.

    Fixed in 7.0.27
  6. Upgrade

    Upgrade redhat/php to a version that resolves this vulnerability.

    Fixed in 7.1.13
  7. Upgrade

    Upgrade redhat/php to a version that resolves this vulnerability.

    Fixed in 7.2.1
  8. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 7.0.27
  9. Upgrade

    Upgrade debian/libgd2 to a version that resolves this vulnerability.

    Fixed in 2.3.0-2Fixed in 2.3.0-2+deb11u1Fixed in 2.3.3-9Fixed in 2.3.3-13
  10. Upgrade

    Upgrade PHP (libgd / GD Graphics Library) to a version that resolves this vulnerability.

    Fixed in 5.6.33Patch fix-75571
  11. Upgrade

    Upgrade PHP (libgd / GD Graphics Library) to a version that resolves this vulnerability.

    Fixed in 7.0.27Patch fix-75571
  12. Upgrade

    Upgrade PHP (libgd / GD Graphics Library) to a version that resolves this vulnerability.

    Fixed in 7.1.13Patch fix-75571
  13. Upgrade

    Upgrade PHP (libgd / GD Graphics Library) to a version that resolves this vulnerability.

    Fixed in 7.2.1Patch fix-75571

Event History

Nov 25, 2017
CVE Published
12:00 AM
Jan 16, 2018
CVE Published
via MITRE·09:00 AM
Data Sourced
via MITRE·09:00 AM
Description
Data Sourced
via NVD·09:29 AM
RemedyDescriptionSeverityWeaknessAffected Software
Jan 30, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software
Feb 20, 2026
Data Sourced
via Ubuntu·03:22 PM
RemedyDescriptionSeverityAffected Software
Data Sourced
via Launchpad·03:22 PM
Description
Data Sourced
via Debian·03:22 PM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2018-5711?

CVE-2018-5711 is a fixed bug in the GD Graphics Library (libgd) that can cause an infinite loop via a crafted GIF file.

2

Which software versions are affected by CVE-2018-5711?

CVE-2018-5711 affects PHP versions 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.

3

What is the severity of CVE-2018-5711?

The severity of CVE-2018-5711 is medium with a CVSS score of 5.5.

4

How can I fix CVE-2018-5711?

To fix CVE-2018-5711, update your PHP installation to version 5.6.33, 7.0.27, 7.1.13, or 7.2.1.

5

Where can I find more information about CVE-2018-5711?

You can find more information about CVE-2018-5711 on the PHP official website and the PHP bug tracker.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203