{"id":"CVE-2019-6977","published":"2019-01-27T02:00:00Z","modified":"2024-08-04T20:38:32Z","title":"gdImageColorMatch in gd_color_match.c in the GD Graphics Library (aka LibGD) 2.2.5, as used in the imagecolormatch…","vendor":null,"product":null,"tier":"core","eol":null,"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"A heap-based buffer overflow exists in the gdImageColorMatch function in gd_color_match.c of the GD Graphics Library (LibGD) 2.2.5, as used by 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. An attacker who can cause imagecolormatch to be called with crafted image data can trigger the overflow.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-29T07:15:39Z"},"cvss":null,"epss":{"score":0.71496,"percentile":0.99416,"date":"2026-11-01","provenance":"source"},"kev":null,"vulncheckKev":null,"exploited":false,"otx":{"pulseCount":2,"pulses":[{"name":"216.70.102.87  accessdomain.com   64.207.129.182","url":"https://otx.alienvault.com/pulse/67eca9b9739aeabdab40759b","created":"2025-04-02"},{"name":"Internal CVE Research","url":"https://otx.alienvault.com/pulse/6228b4f0b2d5ade72cc7a0ea","created":"2022-03-09"}],"provenance":"machine"},"cwes":[],"references":[{"url":"http://www.securityfocus.com/bid/106731","tags":["vdb-entry","x_refsource_BID"]},{"url":"https://security.netapp.com/advisory/ntap-20190315-0003/","tags":["x_refsource_CONFIRM"]},{"url":"http://php.net/ChangeLog-5.php","tags":["x_refsource_MISC"]},{"url":"http://php.net/ChangeLog-7.php","tags":["x_refsource_MISC"]},{"url":"https://usn.ubuntu.com/3900-1/","tags":["vendor-advisory","x_refsource_UBUNTU"]},{"url":"https://lists.debian.org/debian-lts-announce/2019/01/msg00028.html","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://bugs.php.net/bug.php?id=77270","tags":["x_refsource_MISC"]},{"url":"https://www.debian.org/security/2019/dsa-4384","tags":["vendor-advisory","x_refsource_DEBIAN"]},{"url":"https://security.gentoo.org/glsa/201903-18","tags":["vendor-advisory","x_refsource_GENTOO"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00025.html","tags":["vendor-advisory","x_refsource_SUSE"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00031.html","tags":["vendor-advisory","x_refsource_SUSE"]},{"url":"https://www.exploit-db.com/exploits/46677/","tags":["exploit","x_refsource_EXPLOIT-DB"]},{"url":"http://packetstormsecurity.com/files/152459/PHP-7.2-imagecolormatch-Out-Of-Band-Heap-Write.html","tags":["x_refsource_MISC"]},{"url":"https://access.redhat.com/errata/RHSA-2019:2519","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2019:3299","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TEYUUOW75YD3DENIPYMO263E6NL2NFHI/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3WRUPZVT2MWFUEMVGTRAGDOBHLNMGK5R/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TTXSLRZI5BCQT3H5KALG3DHUWUMNPDX2/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3CZ2QADQTKRHTGB2AHD7J4QQNDLBEMM6/","tags":["vendor-advisory","x_refsource_FEDORA"]}],"techniques":[],"reports":[],"affected":[],"advisories":[],"euvd":{"id":"EUVD-2019-16529","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2019-16529","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[{"id":46677,"url":"https://www.exploit-db.com/exploits/46677","title":"PHP 7.2 - 'imagecolormatch()' Out of Band Heap Write","type":"remote","platform":"php","date":"2019-02-27","verified":false,"provenance":"source"}],"exploitSources":{"exploitdb":{"count":1,"earliest":"2019-02-27"},"pocGithub":{"count":1,"skipped":0,"earliest":"2026-08-06","earliestUrl":"https://github.com/HORKimhab/CVE-2022-31626-CVE-2024-2961-CVE-2019-6977","repos":[{"name":"HORKimhab/CVE-2022-31626-CVE-2024-2961-CVE-2019-6977","url":"https://github.com/HORKimhab/CVE-2022-31626-CVE-2024-2961-CVE-2019-6977","stars":0,"created":"2026-08-06"}]},"first":{"date":"2019-02-27","source":"Exploit-DB","url":"https://www.exploit-db.com/exploits/46677"},"provenance":"source"},"exploitRefs":["https://www.exploit-db.com/exploits/46677/","http://packetstormsecurity.com/files/152459/PHP-7.2-imagecolormatch-Out-Of-Band-Heap-Write.html"],"flow":[],"timeline":[{"date":"2019-01-27","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2019-6977","provenance":"source"},{"date":"2019-02-27","kind":"exploit-public","label":"First public exploit: Exploit-DB (EDB-46677); later: PoC-in-GitHub 2026-08-06","url":"https://www.exploit-db.com/exploits/46677","provenance":"source"}],"speed":{"daysToPublicExploit":31,"firstExploitFrom":"Exploit-DB","daysToKev":null},"priority":{"score":26.0,"factors":[{"name":"In a KEV catalog","points":0.0,"detail":"not listed"},{"name":"Recent KEV listing","points":0.0,"detail":"not listed"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.88,"detail":"percentile 0.9942"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"1 NVD reference tagged Exploit; 1 Exploit-DB entry; 1 NVD exploit link; 1 PoC-in-GitHub repo"},{"name":"Mentioned in OTX pulses","points":1.08,"detail":"2 pulses"},{"name":"CVSS severity","points":0.0,"detail":"no CVSS"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}