Skip to content
Fencer Vulns
medium 6.5

CVE-2017-7890 json

The GIF decoding function gdImageCreateFromGifCtx in gd_gif_in.c in the GD Graphics Library (aka libgd), as used in PHP before 5.6.31 and 7…

published 2017-08-02 9 y ago modified 2026-06-17 4 mo ago also EUVD-2017-16862

cvss
6.5
version 3.0, NVD
cisa kev
Not listed
not in CISA's catalog
epss
3.4%
EPSS 3.4% chance of exploitation in 30 days, percentile 88%
public exploits
0
none known

Summary

The GIF decoding function gdImageCreateFromGifCtx in gd_gif_in.c in the GD Graphics Library (aka libgd), as used in PHP before 5.6.31 and 7.x before 7.1.7, does not zero colorMap arrays before use. A specially crafted GIF image could use the uninitialized tables to read ~700 bytes from the top of the stack, potentially disclosing sensitive information.

Patch / fix

  • libgd2 Debian 14, Debian 13, Debian 12 2.2.5-1

debian advisories DEBIAN-CVE-2017-7890

  • libgd2 Ubuntu 14.04 LTS 2.1.0-3ubuntu0.7
  • libgd2 Ubuntu 16.04 LTS 2.1.1-4ubuntu0.16.04.7

ubuntu advisories UBUNTU-CVE-2017-7890

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • rh-php70-php RHEL 3 SOFTWARE_COLLECTIONS 7.0.27-1.el6
  • rh-php70-php RHEL 3 SOFTWARE_COLLECTIONS 7.0.27-1.el7
  • rh-php70-php-gd RHEL 3 SOFTWARE_COLLECTIONS 7.0.27-1.el6
  • rh-php70-php-gd RHEL 3 SOFTWARE_COLLECTIONS 7.0.27-1.el7
  • rh-php70-php-cli RHEL 3 SOFTWARE_COLLECTIONS 7.0.27-1.el6
  • rh-php70-php-cli RHEL 3 SOFTWARE_COLLECTIONS 7.0.27-1.el7
  • rh-php70-php-dba RHEL 3 SOFTWARE_COLLECTIONS 7.0.27-1.el6
  • rh-php70-php-dba RHEL 3 SOFTWARE_COLLECTIONS 7.0.27-1.el7

red hat advisories RHSA-2018:1296RHSA-2018:0406

  • gd SLES for SAP 12 SP5, SLES for SAP 12 SP4, SLES 12 SP5 +6 more 2.1.0-24.17.1
  • php53 SLES for SAP 11 SP4, SLES 11 SP4, SLE Software Development Kit 11 SP4 5.3.17-112.5.1
  • php5 SLE Software Development Kit 12 SP3, SLE Software Development Kit 12 SP2, SLE Module for Web and Scripting 12 5.5.14-109.5.1
  • php7 SLE Software Development Kit 12 SP3, SLE Software Development Kit 12 SP2, SLE Module for Web and Scripting 12 7.0.7-50.9.2

suse advisories SUSE-SU-2020:0623-1SUSE-SU-2017:2522-1SUSE-SU-2017:2317-1SUSE-SU-2017:2303-1

  • gd openSUSE Tumbleweed 2.3.3-1.1

opensuse advisories openSUSE-SU-2024:10777-1

  • gd Alpine 3.6, Alpine 3.5, Alpine 3.4 2.2.5-r0
  • php7 Alpine 3.7 7.1.7-r0

alpine advisories ALPINE-CVE-2017-7890

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2017-7890 updated cvss 5.5

php: Buffer over-read from unitialized data in gdImageCreateFromGifCtx function

  • Red Hat Enterprise Linux 5 php, php53 Red Hat Enterprise Linux 6 php, php-gd, php-cli, php-dba, php-fpm, php-pdo, +20 more Red Hat OpenShift Enterprise 2 php Red Hat Software Collections rh-php56-php, rh-php56-php-gd, rh-php56-php-cli, rh-php56-php-dba, rh-php56-php-dbg, rh-php56-php-fpm, +22 more
    affected: no fix planned “Will not fix”
  • Red Hat Enterprise Linux Client Optional (v. 7) php 5.4.16-43.el7_4.1, php-gd 5.4.16-43.el7_4.1, php-cli 5.4.16-43.el7_4.1, php-dba 5.4.16-43.el7_4.1, php-fpm 5.4.16-43.el7_4.1, php-pdo 5.4.16-43.el7_4.1, +18 more Red Hat Enterprise Linux ComputeNode Optional (v. 7) php 5.4.16-43.el7_4.1, php-gd 5.4.16-43.el7_4.1, php-cli 5.4.16-43.el7_4.1, php-dba 5.4.16-43.el7_4.1, php-fpm 5.4.16-43.el7_4.1, php-pdo 5.4.16-43.el7_4.1, +18 more Red Hat Enterprise Linux for ARM and IBM Power LE (POWER9) Server (v. 7) php 5.4.16-43.el7_4.1, php-gd 5.4.16-43.el7_4.1, php-cli 5.4.16-43.el7_4.1, php-pdo 5.4.16-43.el7_4.1, php-xml 5.4.16-43.el7_4.1, php-ldap 5.4.16-43.el7_4.1, +8 more Red Hat Enterprise Linux for ARM and IBM Power LE (POWER9) Server Optional (v. 7) php-dba 5.4.16-43.el7_4.1, php-fpm 5.4.16-43.el7_4.1, php-intl 5.4.16-43.el7_4.1, php-snmp 5.4.16-43.el7_4.1, php-bcmath 5.4.16-43.el7_4.1, php-pspell 5.4.16-43.el7_4.1, +4 more Red Hat Enterprise Linux Server (v. 7) php 5.4.16-43.el7_4.1, php-gd 5.4.16-43.el7_4.1, php-cli 5.4.16-43.el7_4.1, php-pdo 5.4.16-43.el7_4.1, php-xml 5.4.16-43.el7_4.1, php-ldap 5.4.16-43.el7_4.1, +8 more Red Hat Enterprise Linux Server Optional (v. 7) php-dba 5.4.16-43.el7_4.1, php-fpm 5.4.16-43.el7_4.1, php-intl 5.4.16-43.el7_4.1, php-snmp 5.4.16-43.el7_4.1, php-bcmath 5.4.16-43.el7_4.1, php-pspell 5.4.16-43.el7_4.1, +4 more
    +2 more products
    Red Hat Enterprise Linux Workstation (v. 7) php 5.4.16-43.el7_4.1, php-gd 5.4.16-43.el7_4.1, php-cli 5.4.16-43.el7_4.1, php-pdo 5.4.16-43.el7_4.1, php-xml 5.4.16-43.el7_4.1, php-ldap 5.4.16-43.el7_4.1, +8 more Red Hat Enterprise Linux Workstation Optional (v. 7) php-dba 5.4.16-43.el7_4.1, php-fpm 5.4.16-43.el7_4.1, php-intl 5.4.16-43.el7_4.1, php-snmp 5.4.16-43.el7_4.1, php-bcmath 5.4.16-43.el7_4.1, php-pspell 5.4.16-43.el7_4.1, +4 more
    fixed: vendor fix RHSA-2018:0406
  • Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 6) rh-php70-php 7.0.27-1.el6, rh-php70-php-gd 7.0.27-1.el6, rh-php70-php-cli 7.0.27-1.el6, rh-php70-php-dba 7.0.27-1.el6, rh-php70-php-dbg 7.0.27-1.el6, rh-php70-php-fpm 7.0.27-1.el6, +24 more Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-php70-php 7.0.27-1.el7, rh-php70-php-gd 7.0.27-1.el7, rh-php70-php-cli 7.0.27-1.el7, rh-php70-php-dba 7.0.27-1.el7, rh-php70-php-dbg 7.0.27-1.el7, rh-php70-php-fpm 7.0.27-1.el7, +22 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 6.7) rh-php70-php 7.0.27-1.el6, rh-php70-php-gd 7.0.27-1.el6, rh-php70-php-cli 7.0.27-1.el6, rh-php70-php-dba 7.0.27-1.el6, rh-php70-php-dbg 7.0.27-1.el6, rh-php70-php-fpm 7.0.27-1.el6, +24 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.3) rh-php70-php 7.0.27-1.el7, rh-php70-php-gd 7.0.27-1.el7, rh-php70-php-cli 7.0.27-1.el7, rh-php70-php-dba 7.0.27-1.el7, rh-php70-php-dbg 7.0.27-1.el7, rh-php70-php-fpm 7.0.27-1.el7, +22 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.4) rh-php70-php 7.0.27-1.el7, rh-php70-php-gd 7.0.27-1.el7, rh-php70-php-cli 7.0.27-1.el7, rh-php70-php-dba 7.0.27-1.el7, rh-php70-php-dbg 7.0.27-1.el7, rh-php70-php-fpm 7.0.27-1.el7, +22 more Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.5) rh-php70-php 7.0.27-1.el7, rh-php70-php-gd 7.0.27-1.el7, rh-php70-php-cli 7.0.27-1.el7, rh-php70-php-dba 7.0.27-1.el7, rh-php70-php-dbg 7.0.27-1.el7, rh-php70-php-fpm 7.0.27-1.el7, +22 more
    +2 more products
    Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 6) rh-php70-php 7.0.27-1.el6, rh-php70-php-gd 7.0.27-1.el6, rh-php70-php-cli 7.0.27-1.el6, rh-php70-php-dba 7.0.27-1.el6, rh-php70-php-dbg 7.0.27-1.el6, rh-php70-php-fpm 7.0.27-1.el6, +24 more Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-php70-php 7.0.27-1.el7, rh-php70-php-gd 7.0.27-1.el7, rh-php70-php-cli 7.0.27-1.el7, rh-php70-php-dba 7.0.27-1.el7, rh-php70-php-dbg 7.0.27-1.el7, rh-php70-php-fpm 7.0.27-1.el7, +22 more
    fixed: vendor fix RHSA-2018:1296

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

3.42% chance of exploitation in the next 30 days, higher than 88% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
NVD 3.0 6.5 CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
NVD 2.0 4.3 AV:N/AC:M/Au:N/C:P/I:N/A:N

Classification

Weakness
  • CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.