CVE-2018-5711: 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 bef…

CVE-2018-5711 affects 84 listed versions of PHP in the Dawnsentry catalogue.

5.5CVSS medium
None knownexploitation
13%EPSS (next 30 days)
16 January 2018published

Affected products and versions

The versions in the Dawnsentry catalogue this CVE affects, judged from the vendor's own advisory where there is one, otherwise from the CVE record and NVD, as each version's own page says.

PHP

84 of 250 listed versions are affected. No fixed release is named. The newest release, 8.6.0, is not affected.

7.0.26 7.0.25 7.0.24 7.0.23 7.0.22 7.0.21 7.0.20 7.0.19 5.6.32 5.6.31 5.6.30 5.6.29 5.6.28 5.6.27 5.6.26 5.5.38 5.5.37 5.5.36 5.5.35 5.5.34 5.5.33 5.5.32 5.5.31 5.5.30 5.5.29 5.5.28 5.5.27 5.5.26 5.5.25 5.5.24 5.4.45 5.4.44 5.4.43 5.4.42 5.4.41 5.4.40 5.4.39 5.4.38 5.4.37 5.4.36 5.4.35 5.4.34 5.4.33 5.4.32 5.4.31 5.3.29 5.3.28 5.3.27 5.3.26 5.3.25 5.3.24 5.3.23 5.3.22 5.3.21 5.3.20 5.3.19 5.3.18 5.3.17 5.3.16 5.3.15 and 24 more

What it is

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.

CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H (NVD)

Published by MITRE on 16 January 2018. Last changed 17 June 2026.

Sources

Check one version you run: look CVE-2018-5711 up, or pick a product and version in the quick lookup.

Updated 1 December 2026.