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…
Noroxi assessment
Priority: Monitor (action score 26/100)
- Public proof-of-concept code exists (GitHub); there is no record of exploitation in the wild.
- Probability of exploitation in the next 30 days: 13.2% (FIRST EPSS); higher than 96.4% of all records.
- Someone with local access to the system can trigger it. No account or password is required. A user must open a link or visit a page. No special conditions are required; it is repeatable.
- Fixed version: gd (Alpine:v3.10) 2.2.5-r2; php5 (Alpine:v3.4) 5.6.33-r0; php7 (Alpine:v3.5) 7.0.27-r0.
Low priority for now. Upgrade to gd (Alpine:v3.10) 2.2.5-r2; php5 (Alpine:v3.4) 5.6.33-r0; php7 (Alpine:v3.5) 7.0.27-r0 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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.
- Published
- Jan 16, 2018
- Updated
- Jun 16, 2026
- EPSS
- 13.2% · 96th percentile
- CWE
- CWE-681
Report tools
Action score
26
Low priority for now.
- CVSS
- 22 / 40 · 5.5 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 4 / 30 · 13.2%
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- Proof of concept exists, no weaponized module
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| php | php | cpe:2.3:a:php:php |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
| canonical | ubuntu linux | cpe:2.3:o:canonical:ubuntu_linux |
Using php? Add it to your stack and be the first to know about CVEs like this one. (PHP)
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- php phpup to 5.6.32 inclusive
- php php7.0.0 and later · up to 7.0.26 inclusive
- php phpafter 7.1.0 · up to 7.1.12 inclusive
- php php7.2.0
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Alpine:v3.10 | gd | before 2.2.5-r2 | 2.2.5-r2 |
| Alpine:v3.4 | php5 | before 5.6.33-r0 | 5.6.33-r0 |
| Alpine:v3.5 | php7 | before 7.0.27-r0 | 7.0.27-r0 |
| Alpine:v3.6 | php7 | before 7.1.13-r0 | 7.1.13-r0 |
| Debian:12 | libgd2 | before 2.2.5-4.1 | 2.2.5-4.1 |
| Debian:7 | libgd2 | before 2.0.36~rc1~dfsg-6.1+deb7u11 | 2.0.36~rc1~dfsg-6.1+deb7u11 |
| Debian:8 | libgd2 | before 2.1.0-5+deb8u12 | 2.1.0-5+deb8u12 |
| Debian:8 | php5 | before 5.6.33+dfsg-0+deb8u1 | 5.6.33+dfsg-0+deb8u1 |
| Debian:9 | php7.0 | before 7.0.27-0+deb9u1 | 7.0.27-0+deb9u1 |
| openSUSE:Tumbleweed | gd | before 2.3.3-1.1 | 2.3.3-1.1 |
| Red Hat:rhel_software_collections:3::el7 | rh-php71-php | before 0:7.1.30-1.el7 | 0:7.1.30-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php71-php-bcmath | before 0:7.1.30-1.el7 | 0:7.1.30-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php71-php-cli | before 0:7.1.30-1.el7 | 0:7.1.30-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php71-php-common | before 0:7.1.30-1.el7 | 0:7.1.30-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php71-php-dba | before 0:7.1.30-1.el7 | 0:7.1.30-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php71-php-dbg | before 0:7.1.30-1.el7 | 0:7.1.30-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php71-php-debuginfo | before 0:7.1.30-1.el7 | 0:7.1.30-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php71-php-devel | before 0:7.1.30-1.el7 | 0:7.1.30-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php71-php-embedded | before 0:7.1.30-1.el7 | 0:7.1.30-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php71-php-enchant | before 0:7.1.30-1.el7 | 0:7.1.30-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php71-php-fpm | before 0:7.1.30-1.el7 | 0:7.1.30-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php71-php-gd | before 0:7.1.30-1.el7 | 0:7.1.30-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php71-php-gmp | before 0:7.1.30-1.el7 | 0:7.1.30-1.el7 |
| Red Hat:rhel_software_collections:3::el7 | rh-php71-php-intl | before 0:7.1.30-1.el7 | 0:7.1.30-1.el7 |
+21
Same product
php: all recordsOther highest-scoring records for the same primary product.
- CVE-2024-4577Argument Injection in PHP-CGIKEV99Now
- CVE-2019-11043Underflow in PHP-FPM can lead to RCEKEV99Now
- CVE-2012-1823sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not properly handle…KEV99Now
Published before and after this one in the same product
- ← EarlierCVE-2017-12934Aug 17, 2017 · ext/standard/var_unserializer.re in PHP 7.0.x before 7.0.21 and 7.1.x before 7.1.7 is prone to a heap use after free while unserializing…31Monitor
- ← EarlierCVE-2017-16642Nov 7, 2017 · In PHP before 5.6.32, 7.x before 7.0.25, and 7.1.x before 7.1.11, an error in the date extension's timelib_meridian handling of 'front of'…38Monitor
- Later →CVE-2018-5712Jan 16, 2018 · An issue was discovered 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.48Plan
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| alpine:gd | 2.2.5-r2 · Alpine:v3.10 | Package registry (OSV) |
| alpine:php5 | 5.6.33-r0 · Alpine:v3.4 | Package registry (OSV) |
| alpine:php7 | 7.0.27-r0 · Alpine:v3.5 | Package registry (OSV) |
| debian:libgd2 | 2.2.5-4.1 · Debian:12 | Package registry (OSV) |
| debian:php5 | 5.6.33+dfsg-0+deb8u1 · Debian:8 | Package registry (OSV) |
| debian:php7.0 | 7.0.27-0+deb9u1 · Debian:9 | Package registry (OSV) |
| opensuse:gd | 2.3.3-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| red hat:rh-php71-php | 0:7.1.30-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php71-php-bcmath | 0:7.1.30-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php71-php-cli | 0:7.1.30-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php71-php-common | 0:7.1.30-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php71-php-dba | 0:7.1.30-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php71-php-dbg | 0:7.1.30-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php71-php-debuginfo | 0:7.1.30-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php71-php-devel | 0:7.1.30-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php71-php-embedded | 0:7.1.30-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php71-php-enchant | 0:7.1.30-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php71-php-fpm | 0:7.1.30-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-php71-php-gd | 0:7.1.30-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| suse:gd | 2.0.36.RC1-52.33.5.1 · SUSE:Linux Enterprise Software Development Kit 11 SP4 | Package registry (OSV) |
| suse:php5 | 5.5.14-109.17.1 · SUSE:Linux Enterprise Module for Web and Scripting 12 | Package registry (OSV) |
| suse:php53 | 5.3.17-112.20.1 · SUSE:Linux Enterprise Software Development Kit 11 SP4 | Package registry (OSV) |
| suse:php7 | 7.0.7-50.26.1 · SUSE:Linux Enterprise Module for Web and Scripting 12 | Package registry (OSV) |
Exploit status
Proof of concept available
A public proof of concept or detection signature exists. Exploit knowledge is out there; don't delay patching.
Evidence
- Proof-of-concept repository on GitHub ×2
Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.
| Source | Kind | Date |
|---|---|---|
| Proof-of-concept repository on GitHub | stars:2 | 2018-02-01 |
| Proof-of-concept repository on GitHub | stars:1 | 2018-02-01 |
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
- Published
- First PoC+16 d
- TodayNov 16, 2026+3226 d
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Not on record for this CVE: patch commit or PR link · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- No account or password is required.
- A user must open a link or visit a page.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- none
- Integrity
- none
- Availability
- high · the service can be disrupted
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality impact
- None
- Integrity impact
- None
- Availability impact
- High
Weakness class (CWE)
CWE-681 · Incorrect Conversion between Numeric TypesCVSS vector
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (10 more)Show less
- php.net/ChangeLog-7.php
- access.redhat.com/errata/RHSA-2018:1296
- access.redhat.com/errata/RHSA-2019:2519
- bugs.php.net/bug.php?id=75571
- lists.debian.org/debian-lts-announce/2018/01/msg00022.html
- lists.debian.org/debian-lts-announce/2019/01/msg00028.html
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3CZ2QADQTKRHTGB2AHD7J4QQNDLBEMM6/
- security.gentoo.org/glsa/201903-18
- usn.ubuntu.com/3755-1/
- www.oracle.com/security-alerts/cpuapr2020.html
Vendor advisories and official records. Exploit/PoC links are deliberately left out.