{"id":"CVE-2019-6977","url":"https://www.cyber-defence.io/tools/cve/CVE-2019-6977","generatedAt":"2026-10-27T21:15:22.576Z","title":"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.","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.","published":"2019-01-27T02:29:00.000Z","lastModified":"2026-06-17T02:39:52.000Z","status":"Modified","sourceIdentifier":"cve@mitre.org","cvss":{"version":"3.0","score":8.8,"severity":"HIGH","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"},"cwe":["CWE-787"],"affected":["libgd/libgd","php/php","debian/debian linux","canonical/ubuntu linux","netapp/storage automation store"],"epss":{"score":0.71496,"percentile":0.99412,"date":"2026-10-26","history":[{"date":"2026-09-21","score":0.62089,"percentile":0.99168},{"date":"2026-09-22","score":0.71496,"percentile":0.99388}]},"kev":{"listed":false},"exploits":{"count":1,"verified":false,"firstPublished":"2019-02-27","source":"Exploit-DB (https://gitlab.com/exploit-database/exploitdb)","entries":[{"edbId":46677,"kind":"exploit","title":"PHP 7.2 - 'imagecolormatch()' Out of Band Heap Write","url":"https://www.exploit-db.com/exploits/46677","sourceUrl":"https://gitlab.com/exploit-database/exploitdb/-/blob/main/exploits/php/remote/46677.php","file":"exploits/php/remote/46677.php","published":"2019-02-27","added":"2019-04-09","updated":"2019-04-09","author":"cfreal","type":"remote","platform":"php","port":null,"verified":false,"codes":["CVE-2019-6977"],"tags":null,"aliases":null,"applicationUrl":null,"screenshotUrl":null,"referenceUrl":"https://github.com/cfreal/exploits/blob/1a671d1d8510e93a0b2607261e9b779562585fe2/CVE-2019-6977-imagecolormatch/exploit.php"}]},"verdict":{"level":"urgent","text":"EPSS puts the probability of exploitation in the next 30 days at 71.5%, higher than 99% of all known CVEs. Patch or mitigate before the next change window."},"changes":[{"kind":"epss","label":"EPSS jump","at":"2026-09-22T00:00:00.000Z","detail":{"to":0.71496,"from":0.62089,"percentile":0.99388},"summary":"EPSS moved from 62.1% to 71.5% probability of exploitation in the next thirty days."}],"references":[{"url":"http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00025.html","source":"cve@mitre.org"},{"url":"http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00031.html","source":"cve@mitre.org"},{"url":"http://packetstormsecurity.com/files/152459/PHP-7.2-imagecolormatch-Out-Of-Band-Heap-Write.html","source":"cve@mitre.org"},{"url":"http://php.net/ChangeLog-5.php","tags":["Release Notes","Vendor Advisory"],"source":"cve@mitre.org"},{"url":"http://php.net/ChangeLog-7.php","tags":["Release Notes","Vendor Advisory"],"source":"cve@mitre.org"},{"url":"http://www.securityfocus.com/bid/106731","tags":["Third Party Advisory","VDB Entry"],"source":"cve@mitre.org"},{"url":"https://access.redhat.com/errata/RHSA-2019:2519","source":"cve@mitre.org"},{"url":"https://access.redhat.com/errata/RHSA-2019:3299","source":"cve@mitre.org"},{"url":"https://bugs.php.net/bug.php?id=77270","tags":["Exploit","Issue Tracking","Mailing List","Vendor Advisory"],"source":"cve@mitre.org"},{"url":"https://lists.debian.org/debian-lts-announce/2019/01/msg00028.html","tags":["Mailing List","Third Party Advisory"],"source":"cve@mitre.org"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3CZ2QADQTKRHTGB2AHD7J4QQNDLBEMM6/","source":"cve@mitre.org"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3WRUPZVT2MWFUEMVGTRAGDOBHLNMGK5R/","source":"cve@mitre.org"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TEYUUOW75YD3DENIPYMO263E6NL2NFHI/","source":"cve@mitre.org"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TTXSLRZI5BCQT3H5KALG3DHUWUMNPDX2/","source":"cve@mitre.org"},{"url":"https://security.gentoo.org/glsa/201903-18","tags":["Third Party Advisory"],"source":"cve@mitre.org"},{"url":"https://security.netapp.com/advisory/ntap-20190315-0003/","tags":["Patch","Third Party Advisory"],"source":"cve@mitre.org"},{"url":"https://usn.ubuntu.com/3900-1/","tags":["Third Party Advisory"],"source":"cve@mitre.org"},{"url":"https://www.debian.org/security/2019/dsa-4384","tags":["Third Party Advisory"],"source":"cve@mitre.org"},{"url":"https://www.exploit-db.com/exploits/46677/","source":"cve@mitre.org"},{"url":"http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00025.html","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00031.html","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://packetstormsecurity.com/files/152459/PHP-7.2-imagecolormatch-Out-Of-Band-Heap-Write.html","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://php.net/ChangeLog-5.php","tags":["Release Notes","Vendor Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://php.net/ChangeLog-7.php","tags":["Release Notes","Vendor Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"http://www.securityfocus.com/bid/106731","tags":["Third Party Advisory","VDB Entry"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://access.redhat.com/errata/RHSA-2019:2519","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://access.redhat.com/errata/RHSA-2019:3299","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://bugs.php.net/bug.php?id=77270","tags":["Exploit","Issue Tracking","Mailing List","Vendor Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.debian.org/debian-lts-announce/2019/01/msg00028.html","tags":["Mailing List","Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3CZ2QADQTKRHTGB2AHD7J4QQNDLBEMM6/","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3WRUPZVT2MWFUEMVGTRAGDOBHLNMGK5R/","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TEYUUOW75YD3DENIPYMO263E6NL2NFHI/","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TTXSLRZI5BCQT3H5KALG3DHUWUMNPDX2/","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://security.gentoo.org/glsa/201903-18","tags":["Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://security.netapp.com/advisory/ntap-20190315-0003/","tags":["Patch","Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://usn.ubuntu.com/3900-1/","tags":["Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.debian.org/security/2019/dsa-4384","tags":["Third Party Advisory"],"source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.exploit-db.com/exploits/46677/","source":"af854a3a-2127-422b-91ae-364da2661108"}],"sources":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2019-6977","epss":"https://www.first.org/epss/","kev":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","exploitdb":"https://www.exploit-db.com/"},"licence":"CC BY 4.0 — link back to the CVE Explorer if you publish the results; upstream data remains subject to its own terms."}