{"id":"CVE-2019-6977","details":"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.","modified":"2026-05-06T04:18:36.806871Z","published":"2019-01-27T02:29:00.340Z","related":["ALSA-2020:4659","SUSE-SU-2019:0333-1","SUSE-SU-2019:0449-1","SUSE-SU-2019:0747-1","SUSE-SU-2019:0771-1","SUSE-SU-2019:13961-1","openSUSE-SU-2019:1148-1","openSUSE-SU-2024:10777-1","openSUSE-SU-2024:11852-1"],"database_specific":{"unresolved_ranges":[{"cpe":"cpe:2.3:a:php:php:*:*:*:*:*:*:*:*","extracted_events":[{"fixed":"5.6.40"},{"introduced":"7.0.0"},{"fixed":"7.1.26"},{"introduced":"7.2.0"},{"fixed":"7.2.14"}],"source":"CPE_FIELD"},{"cpe":"cpe:2.3:a:php:php:7.3.0:*:*:*:*:*:*:*","extracted_events":[{"last_affected":"7.3.0"}],"source":"CPE_FIELD"},{"cpe":"cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*","extracted_events":[{"last_affected":"14.04"}],"source":"CPE_FIELD"},{"extracted_events":[{"last_affected":"16.04"}],"source":"CPE_FIELD","cpe":"cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*"},{"cpe":"cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*","extracted_events":[{"last_affected":"18.04"}],"source":"CPE_FIELD"},{"extracted_events":[{"last_affected":"18.10"}],"source":"CPE_FIELD","cpe":"cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*"},{"cpe":"cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*","extracted_events":[{"last_affected":"8.0"}],"source":"CPE_FIELD"},{"extracted_events":[{"last_affected":"9.0"}],"source":"CPE_FIELD","cpe":"cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*"}]},"references":[{"type":"WEB","url":"http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00025.html"},{"type":"WEB","url":"http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00031.html"},{"type":"WEB","url":"http://packetstormsecurity.com/files/152459/PHP-7.2-imagecolormatch-Out-Of-Band-Heap-Write.html"},{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3CZ2QADQTKRHTGB2AHD7J4QQNDLBEMM6/"},{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3WRUPZVT2MWFUEMVGTRAGDOBHLNMGK5R/"},{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TEYUUOW75YD3DENIPYMO263E6NL2NFHI/"},{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TTXSLRZI5BCQT3H5KALG3DHUWUMNPDX2/"},{"type":"WEB","url":"https://www.exploit-db.com/exploits/46677/"},{"type":"ADVISORY","url":"http://php.net/ChangeLog-5.php"},{"type":"ADVISORY","url":"http://php.net/ChangeLog-7.php"},{"type":"ADVISORY","url":"http://www.securityfocus.com/bid/106731"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2019:2519"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2019:3299"},{"type":"ADVISORY","url":"https://lists.debian.org/debian-lts-announce/2019/01/msg00028.html"},{"type":"ADVISORY","url":"https://security.gentoo.org/glsa/201903-18"},{"type":"ADVISORY","url":"https://usn.ubuntu.com/3900-1/"},{"type":"ADVISORY","url":"https://www.debian.org/security/2019/dsa-4384"},{"type":"REPORT","url":"https://bugs.php.net/bug.php?id=77270"},{"type":"FIX","url":"https://security.netapp.com/advisory/ntap-20190315-0003/"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/libgd/libgd","events":[{"introduced":"0"},{"last_affected":"8255231b68889597d04d451a72438ab92a405aba"}],"database_specific":{"cpe":"cpe:2.3:a:libgd:libgd:2.2.5:*:*:*:*:*:*:*","extracted_events":[{"introduced":"0"},{"last_affected":"2.2.5"}],"source":"CPE_FIELD"}}],"versions":["GD_1_3_0","GD_1_4_0","GD_1_5_0","GD_1_6_0","GD_1_6_1","GD_1_6_2","GD_1_6_3","GD_1_7_0","GD_1_7_1","GD_1_7_2","GD_1_7_3","GD_1_8_0","GD_1_8_1","GD_1_8_3","GD_1_8_4","GD_2_0_0","GD_2_0_1","GD_2_0_10","GD_2_0_11","GD_2_0_12","GD_2_0_13","GD_2_0_14","GD_2_0_15","GD_2_0_17","GD_2_0_18","GD_2_0_19","GD_2_0_2","GD_2_0_20","GD_2_0_21","GD_2_0_22","GD_2_0_23","GD_2_0_24","GD_2_0_25","GD_2_0_26","GD_2_0_27","GD_2_0_28","GD_2_0_29","GD_2_0_3","GD_2_0_30","GD_2_0_31","GD_2_0_32","GD_2_0_33","GD_2_0_34RC1","GD_2_0_4","GD_2_0_5","GD_2_0_6","GD_2_0_7","GD_2_0_8","GD_2_0_9","gd-2.1.0","gd-2.1.0-alpha1","gd-2.1.0-rc1","gd-2.1.1","gd-2.2.0","gd-2.2.1","gd-2.2.2","gd-2.2.3","gd-2.2.4","gd-2.2.5"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2019-6977.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"}]}