CVE-2019-6977
publishedgd: Heap-based buffer overflow in gdImageColorMatch() in gd_color_match.c
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| n/a | — | n/an/a | Affected | Not stated | mitre |
| AlmaLinux | 8 | gd | Advisory build | 2.2.5-7.el8 | ALSA-2020:4659 |
| Alpine Linux | edge | gd | Fixed | 2.2.5-r2 | Package fix record |
| Debian | jessie | libgd2 | Advisory build | 2.1.0-5+deb8u12 | DLA-1651-1 |
| Oracle Linux | 8 | gdaarch64 | Advisory build | 0:2.2.5-7.el8 | ELSA-2020-4659 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-phpaarch64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| AlmaLinux | 8 | gd-devel | Advisory build | 2.2.5-7.el8 | ALSA-2020:4659 |
| Alpine Linux | v3.10 | gd | Fixed | 2.2.5-r2 | Package fix record |
Show 93 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Alpine Linux | v3.11 | gd | Fixed | 2.2.5-r2 | Package fix record |
| Alpine Linux | v3.12 | gd | Fixed | 2.2.5-r2 | Package fix record |
| Alpine Linux | v3.13 | gd | Fixed | 2.2.5-r2 | Package fix record |
| Alpine Linux | v3.14 | gd | Fixed | 2.2.5-r2 | Package fix record |
| Alpine Linux | v3.15 | gd | Fixed | 2.2.5-r2 | Package fix record |
| Alpine Linux | v3.16 | gd | Fixed | 2.2.5-r2 | Package fix record |
| Alpine Linux | v3.17 | gd | Fixed | 2.2.5-r2 | Package fix record |
| Alpine Linux | v3.18 | gd | Fixed | 2.2.5-r2 | Package fix record |
| Alpine Linux | v3.19 | gd | Fixed | 2.2.5-r2 | Package fix record |
| Alpine Linux | v3.20 | gd | Fixed | 2.2.5-r2 | Package fix record |
| Alpine Linux | v3.21 | gd | Fixed | 2.2.5-r2 | Package fix record |
| Alpine Linux | v3.22 | gd | Fixed | 2.2.5-r2 | Package fix record |
| Alpine Linux | v3.23 | gd | Fixed | 2.2.5-r2 | Package fix record |
| Alpine Linux | v3.24 | gd | Fixed | 2.2.5-r2 | Package fix record |
| Alpine Linux | v3.6 | gd | Fixed | 2.2.5-r2 | Package fix record |
| Alpine Linux | v3.7 | gd | Fixed | 2.2.5-r2 | Package fix record |
| Alpine Linux | v3.7 | php7 | Fixed | 7.1.29-r0 | Package fix record |
| Alpine Linux | v3.8 | gd | Fixed | 2.2.5-r2 | Package fix record |
| Alpine Linux | v3.9 | gd | Fixed | 2.2.5-r2 | Package fix record |
| Debian | jessie | php5 | Advisory build | 5.6.40+dfsg-0+deb8u1 | DLA-1679-1 |
| Debian | stretch | libgd2 | Advisory build | 2.2.4-2+deb9u4 | DSA-4384-1 |
| Oracle Linux | 8 | gdx86_64 | Advisory build | 0:2.2.5-7.el8 | ELSA-2020-4659 |
| Oracle Linux | 8 | gd-develaarch64 | Advisory build | 0:2.2.5-7.el8 | ELSA-2020-4659 |
| Oracle Linux | 8 | gd-develx86_64 | Advisory build | 0:2.2.5-7.el8 | ELSA-2020-4659 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-phpppc64le | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-phps390x | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-phpsrc | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-phpx86_64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-bcmathaarch64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-bcmathppc64le | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-bcmaths390x | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-bcmathx86_64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-cliaarch64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-clippc64le | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-clis390x | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-clix86_64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-commonaarch64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-commonppc64le | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-commons390x | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-commonx86_64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-dbaaarch64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-dbappc64le | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-dbas390x | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-dbax86_64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-dbgaarch64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-dbgppc64le | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-dbgs390x | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-dbgx86_64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-debuginfoaarch64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-debuginfoppc64le | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-debuginfos390x | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-debuginfox86_64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-develaarch64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-develppc64le | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-devels390x | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-develx86_64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-embeddedaarch64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-embeddedppc64le | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-embeddeds390x | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-embeddedx86_64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-enchantaarch64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-enchantppc64le | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-enchants390x | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-enchantx86_64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-fpmaarch64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-fpmppc64le | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-fpms390x | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-fpmx86_64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-gdaarch64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-gdppc64le | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-gds390x | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-gdx86_64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-gmpaarch64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-gmpppc64le | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-gmps390x | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-gmpx86_64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-intlaarch64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-intlppc64le | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-intls390x | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-intlx86_64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-jsonaarch64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-jsonppc64le | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-jsons390x | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-jsonx86_64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-ldapaarch64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-ldapppc64le | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-ldaps390x | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-ldapx86_64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-mbstringaarch64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-mbstringppc64le | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-mbstrings390x | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-mbstringx86_64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
| Red Hat Enterprise Linux | RHEL-7 | rh-php71-php-mysqlndaarch64 | Advisory build | 7.1.30-1.el7 | RHSA-2019:2519 |
Package entries are limited to the first 100 builds and 100 linked advisories.
Description
gdImageColorMatch in gd_color_match.c in the GD Graphics Library (aka LibGD) 2.2.5, as used in the imagecolormatch function in PHP before 5.6.40, 7.x before 7.1.26, 7.2.x before 7.2.14, and 7.3.x before 7.3.1, has a heap-based buffer overflow. This can be exploited by an attacker who is able to trigger imagecolormatch calls with crafted image data.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
No normalized assessments.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| n/a | n/a | n/a (affected) | mitre · cna |
Weaknesses
1- n/a
References
19- openSUSE-SU-2019:1148 http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00025.html
- openSUSE-SU-2019:1140 http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00031.html
- http://packetstormsecurity.com/files/152459/PHP-7.2-imagecolormatch-Out-Of-Band-Heap-Write.html
- http://php.net/ChangeLog-5.php
- http://php.net/ChangeLog-7.php
- 106731 http://www.securityfocus.com/bid/106731
- RHSA-2019:2519 https://access.redhat.com/errata/RHSA-2019:2519
- RHSA-2019:3299 https://access.redhat.com/errata/RHSA-2019:3299
- https://bugs.php.net/bug.php?id=77270
- [debian-lts-announce] 20190130 [SECURITY] [DLA 1651-1] libgd2 security update https://lists.debian.org/debian-lts-announce/2019/01/msg00028.html
- FEDORA-2020-e795f92d79 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3CZ2QADQTKRHTGB2AHD7J4QQNDLBEMM6/
- FEDORA-2019-d7f8995451 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3WRUPZVT2MWFUEMVGTRAGDOBHLNMGK5R/
- FEDORA-2019-ab7d22a466 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TEYUUOW75YD3DENIPYMO263E6NL2NFHI/
- FEDORA-2019-7a06c0e6b4 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TTXSLRZI5BCQT3H5KALG3DHUWUMNPDX2/
- GLSA-201903-18 https://security.gentoo.org/glsa/201903-18
- https://security.netapp.com/advisory/ntap-20190315-0003/
- USN-3900-1 https://usn.ubuntu.com/3900-1/
- DSA-4384 https://www.debian.org/security/2019/dsa-4384
- 46677 https://www.exploit-db.com/exploits/46677/
Provider assertions
2mitre · cna
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 2d2bd4d8e614873f8284bd94b903038a1b2bffeb3899fd8487c73ac418ece927
- Ingested
- 23 Sep 2026, 07:47:31 UTC
- Source record
- Official CVE record