Skip to main content
Public proof of conceptFix available

CVE-2018-5711

A public proof of concept exists; no exploitation attested.

  • Published2018-01-16
  • WeaknessCWE-681 · CWE-835

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2018-01-1609:29CVE publishedNVD
  2. 2026-10-2319:23First public proof of conceptPoC-in-GitHub
  3. 2026-10-2319:23EPSS crossed 10 %FIRST EPSS

Versions per branch

NVD
PHP
BranchAffectedFixed in
5.6≤ 5.6.32no fix published
7.0≥ 7.0.0, ≤ 7.0.26no fix published
7.1> 7.1.0, ≤ 7.1.12no fix published
7.2= 7.2.0no fix published
Canonical ubuntu linux
BranchAffectedFixed in
14.4= 14.04no fix published
16.4= 16.04no fix published
18.4= 18.04no fix published
Debian debian linux
BranchAffectedFixed in
7.0= 7.0no fix published
8.0= 8.0no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • gdSUSE:Linux Enterprise Workstation Extension 12 SP3all versions · fixed in 2.1.0-24.6.1
  • gdSUSE:Linux Enterprise Workstation Extension 12 SP2all versions · fixed in 2.1.0-24.6.1
  • gdSUSE:Linux Enterprise Software Development Kit 12 SP3all versions · fixed in 2.1.0-24.6.1
  • gdSUSE:Linux Enterprise Software Development Kit 12 SP2all versions · fixed in 2.1.0-24.6.1
  • gdSUSE:Linux Enterprise Software Development Kit 11 SP4all versions · fixed in 2.0.36.RC1-52.33.5.1
  • gdSUSE:Linux Enterprise Server for SAP Applications 12 SP3all versions · fixed in 2.1.0-24.6.1
  • gdSUSE:Linux Enterprise Server for SAP Applications 12 SP2all versions · fixed in 2.1.0-24.6.1
  • gdSUSE:Linux Enterprise Server for SAP Applications 11 SP4all versions · fixed in 2.0.36.RC1-52.33.5.1

63 more package ranges on OSV.dev

Vendor advisories

  • CVE-2018-5711 Red Hat Product Security679 products fixed · 96 known affected

    gd: Infinite loop in gdImageCreateFromGifCtx() in gd_gif_in.c

    php.src as a component of Red Hat Enterprise Linux 5 · php53.src as a component of Red Hat Enterprise Linux 5 · gd-devel as a component of Red Hat Enterprise Linux 6 · +93 more

  • RHSA-2019:2519 Red Hat Product Security425 products fixed

    Red Hat Security Advisory: rh-php71-php security, bug fix, and enhancement update

  • RHSA-2018:1296 Red Hat Product Security254 products fixed

    Red Hat Security Advisory: rh-php70-php security, bug fix, and enhancement update

Full record on NVD

Fix

  1. Vendor fix Red Hat Product Security RHSA-2019:2519 · 486 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 After installing the updated packages, the httpd daemon must be restarted for the update to take effect.
  2. No fix available, says the vendor Red Hat Product Security CVE-2018-5711 · 7 productsFix deferred
  3. No fix planned, says the vendor Red Hat Product Security CVE-2018-5711 · 3 productsOut of support scope
  4. No fix planned, says the vendor Red Hat Product Security CVE-2018-5711 · 86 productsWill not fix

Advisories and patches

Detection

read 2026-11-01 01:02 UTC
Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Published
2018-01-16
Last Modified
2026-06-17
NVD status
Modified
GitHub Advisory
GHSA-qwqg-rff2-45cw

Frequently asked questions

What is 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 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.

Is CVE-2018-5711 actively exploited?

Active exploitation of CVE-2018-5711 has not been confirmed. Its EPSS score was 13.2% on 2026-11-09, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2018-5711?

CVE-2018-5711 has a CVSS v3 base score of 5.5 (MEDIUM severity), with vector string CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H.

Running gd? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record