{"id":"ALPINE-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":"2025-12-03T22:45:44.634685Z","published":"2019-01-27T02:29:00.340Z","upstream":["CVE-2019-6977"],"references":[{"type":"ADVISORY","url":"https://security.alpinelinux.org/vuln/CVE-2019-6977"}],"affected":[{"package":{"name":"gd","ecosystem":"Alpine:v3.10","purl":"pkg:apk/alpine/gd?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.5-r2"}]}],"versions":["2.0.35-r0","2.0.35-r1","2.0.35-r2","2.0.36_rc1-r0","2.0.36_rc1-r1","2.0.36_rc1-r2","2.0.36_rc1-r3","2.0.36_rc1-r4","2.0.36_rc1-r5","2.0.36_rc1-r6","2.0.36_rc1-r7","2.0.36_rc1-r8","2.0.36_rc1-r9","2.1.0-r0","2.1.0-r1","2.1.1-r0","2.2.1-r0","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.2.4-r1","2.2.4-r2","2.2.5-r0","2.2.5-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-6977.json"}},{"package":{"name":"gd","ecosystem":"Alpine:v3.11","purl":"pkg:apk/alpine/gd?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.5-r2"}]}],"versions":["2.0.35-r0","2.0.35-r1","2.0.35-r2","2.0.36_rc1-r0","2.0.36_rc1-r1","2.0.36_rc1-r2","2.0.36_rc1-r3","2.0.36_rc1-r4","2.0.36_rc1-r5","2.0.36_rc1-r6","2.0.36_rc1-r7","2.0.36_rc1-r8","2.0.36_rc1-r9","2.1.0-r0","2.1.0-r1","2.1.1-r0","2.2.1-r0","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.2.4-r1","2.2.4-r2","2.2.5-r0","2.2.5-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-6977.json"}},{"package":{"name":"gd","ecosystem":"Alpine:v3.12","purl":"pkg:apk/alpine/gd?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.5-r2"}]}],"versions":["2.0.35-r0","2.0.35-r1","2.0.35-r2","2.0.36_rc1-r0","2.0.36_rc1-r1","2.0.36_rc1-r2","2.0.36_rc1-r3","2.0.36_rc1-r4","2.0.36_rc1-r5","2.0.36_rc1-r6","2.0.36_rc1-r7","2.0.36_rc1-r8","2.0.36_rc1-r9","2.1.0-r0","2.1.0-r1","2.1.1-r0","2.2.1-r0","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.2.4-r1","2.2.4-r2","2.2.5-r0","2.2.5-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-6977.json"}},{"package":{"name":"gd","ecosystem":"Alpine:v3.13","purl":"pkg:apk/alpine/gd?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.5-r2"}]}],"versions":["2.0.35-r0","2.0.35-r1","2.0.35-r2","2.0.36_rc1-r0","2.0.36_rc1-r1","2.0.36_rc1-r2","2.0.36_rc1-r3","2.0.36_rc1-r4","2.0.36_rc1-r5","2.0.36_rc1-r6","2.0.36_rc1-r7","2.0.36_rc1-r8","2.0.36_rc1-r9","2.1.0-r0","2.1.0-r1","2.1.1-r0","2.2.1-r0","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.2.4-r1","2.2.4-r2","2.2.5-r0","2.2.5-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-6977.json"}},{"package":{"name":"gd","ecosystem":"Alpine:v3.14","purl":"pkg:apk/alpine/gd?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.5-r2"}]}],"versions":["2.0.35-r0","2.0.35-r1","2.0.35-r2","2.0.36_rc1-r0","2.0.36_rc1-r1","2.0.36_rc1-r2","2.0.36_rc1-r3","2.0.36_rc1-r4","2.0.36_rc1-r5","2.0.36_rc1-r6","2.0.36_rc1-r7","2.0.36_rc1-r8","2.0.36_rc1-r9","2.1.0-r0","2.1.0-r1","2.1.1-r0","2.2.1-r0","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.2.4-r1","2.2.4-r2","2.2.5-r0","2.2.5-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-6977.json"}},{"package":{"name":"gd","ecosystem":"Alpine:v3.15","purl":"pkg:apk/alpine/gd?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.5-r2"}]}],"versions":["2.0.35-r0","2.0.35-r1","2.0.35-r2","2.0.36_rc1-r0","2.0.36_rc1-r1","2.0.36_rc1-r2","2.0.36_rc1-r3","2.0.36_rc1-r4","2.0.36_rc1-r5","2.0.36_rc1-r6","2.0.36_rc1-r7","2.0.36_rc1-r8","2.0.36_rc1-r9","2.1.0-r0","2.1.0-r1","2.1.1-r0","2.2.1-r0","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.2.4-r1","2.2.4-r2","2.2.5-r0","2.2.5-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-6977.json"}},{"package":{"name":"gd","ecosystem":"Alpine:v3.16","purl":"pkg:apk/alpine/gd?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.5-r2"}]}],"versions":["2.0.35-r0","2.0.35-r1","2.0.35-r2","2.0.36_rc1-r0","2.0.36_rc1-r1","2.0.36_rc1-r2","2.0.36_rc1-r3","2.0.36_rc1-r4","2.0.36_rc1-r5","2.0.36_rc1-r6","2.0.36_rc1-r7","2.0.36_rc1-r8","2.0.36_rc1-r9","2.1.0-r0","2.1.0-r1","2.1.1-r0","2.2.1-r0","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.2.4-r1","2.2.4-r2","2.2.5-r0","2.2.5-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-6977.json"}},{"package":{"name":"gd","ecosystem":"Alpine:v3.17","purl":"pkg:apk/alpine/gd?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.5-r2"}]}],"versions":["2.0.35-r0","2.0.35-r1","2.0.35-r2","2.0.36_rc1-r0","2.0.36_rc1-r1","2.0.36_rc1-r2","2.0.36_rc1-r3","2.0.36_rc1-r4","2.0.36_rc1-r5","2.0.36_rc1-r6","2.0.36_rc1-r7","2.0.36_rc1-r8","2.0.36_rc1-r9","2.1.0-r0","2.1.0-r1","2.1.1-r0","2.2.1-r0","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.2.4-r1","2.2.4-r2","2.2.5-r0","2.2.5-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-6977.json"}},{"package":{"name":"gd","ecosystem":"Alpine:v3.18","purl":"pkg:apk/alpine/gd?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.5-r2"}]}],"versions":["2.0.35-r0","2.0.35-r1","2.0.35-r2","2.0.36_rc1-r0","2.0.36_rc1-r1","2.0.36_rc1-r2","2.0.36_rc1-r3","2.0.36_rc1-r4","2.0.36_rc1-r5","2.0.36_rc1-r6","2.0.36_rc1-r7","2.0.36_rc1-r8","2.0.36_rc1-r9","2.1.0-r0","2.1.0-r1","2.1.1-r0","2.2.1-r0","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.2.4-r1","2.2.4-r2","2.2.5-r0","2.2.5-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-6977.json"}},{"package":{"name":"gd","ecosystem":"Alpine:v3.19","purl":"pkg:apk/alpine/gd?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.5-r2"}]}],"versions":["2.0.35-r0","2.0.35-r1","2.0.35-r2","2.0.36_rc1-r0","2.0.36_rc1-r1","2.0.36_rc1-r2","2.0.36_rc1-r3","2.0.36_rc1-r4","2.0.36_rc1-r5","2.0.36_rc1-r6","2.0.36_rc1-r7","2.0.36_rc1-r8","2.0.36_rc1-r9","2.1.0-r0","2.1.0-r1","2.1.1-r0","2.2.1-r0","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.2.4-r1","2.2.4-r2","2.2.5-r0","2.2.5-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-6977.json"}},{"package":{"name":"gd","ecosystem":"Alpine:v3.20","purl":"pkg:apk/alpine/gd?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.5-r2"}]}],"versions":["2.0.35-r0","2.0.35-r1","2.0.35-r2","2.0.36_rc1-r0","2.0.36_rc1-r1","2.0.36_rc1-r2","2.0.36_rc1-r3","2.0.36_rc1-r4","2.0.36_rc1-r5","2.0.36_rc1-r6","2.0.36_rc1-r7","2.0.36_rc1-r8","2.0.36_rc1-r9","2.1.0-r0","2.1.0-r1","2.1.1-r0","2.2.1-r0","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.2.4-r1","2.2.4-r2","2.2.5-r0","2.2.5-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-6977.json"}},{"package":{"name":"gd","ecosystem":"Alpine:v3.21","purl":"pkg:apk/alpine/gd?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.5-r2"}]}],"versions":["2.0.35-r0","2.0.35-r1","2.0.35-r2","2.0.36_rc1-r0","2.0.36_rc1-r1","2.0.36_rc1-r2","2.0.36_rc1-r3","2.0.36_rc1-r4","2.0.36_rc1-r5","2.0.36_rc1-r6","2.0.36_rc1-r7","2.0.36_rc1-r8","2.0.36_rc1-r9","2.1.0-r0","2.1.0-r1","2.1.1-r0","2.2.1-r0","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.2.4-r1","2.2.4-r2","2.2.5-r0","2.2.5-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-6977.json"}},{"package":{"name":"gd","ecosystem":"Alpine:v3.22","purl":"pkg:apk/alpine/gd?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.5-r2"}]}],"versions":["2.0.35-r0","2.0.35-r1","2.0.35-r2","2.0.36_rc1-r0","2.0.36_rc1-r1","2.0.36_rc1-r2","2.0.36_rc1-r3","2.0.36_rc1-r4","2.0.36_rc1-r5","2.0.36_rc1-r6","2.0.36_rc1-r7","2.0.36_rc1-r8","2.0.36_rc1-r9","2.1.0-r0","2.1.0-r1","2.1.1-r0","2.2.1-r0","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.2.4-r1","2.2.4-r2","2.2.5-r0","2.2.5-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-6977.json"}},{"package":{"name":"gd","ecosystem":"Alpine:v3.23","purl":"pkg:apk/alpine/gd?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.5-r2"}]}],"versions":["2.0.35-r0","2.0.35-r1","2.0.35-r2","2.0.36_rc1-r0","2.0.36_rc1-r1","2.0.36_rc1-r2","2.0.36_rc1-r3","2.0.36_rc1-r4","2.0.36_rc1-r5","2.0.36_rc1-r6","2.0.36_rc1-r7","2.0.36_rc1-r8","2.0.36_rc1-r9","2.1.0-r0","2.1.0-r1","2.1.1-r0","2.2.1-r0","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.2.4-r1","2.2.4-r2","2.2.5-r0","2.2.5-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-6977.json"}},{"package":{"name":"gd","ecosystem":"Alpine:v3.6","purl":"pkg:apk/alpine/gd?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.5-r2"}]}],"versions":["2.0.35-r0","2.0.35-r1","2.0.35-r2","2.0.36_rc1-r0","2.0.36_rc1-r1","2.0.36_rc1-r2","2.0.36_rc1-r3","2.0.36_rc1-r4","2.0.36_rc1-r5","2.0.36_rc1-r6","2.0.36_rc1-r7","2.0.36_rc1-r8","2.0.36_rc1-r9","2.1.0-r0","2.1.0-r1","2.1.1-r0","2.2.1-r0","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.2.4-r1","2.2.4-r2","2.2.5-r0","2.2.5-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-6977.json"}},{"package":{"name":"gd","ecosystem":"Alpine:v3.7","purl":"pkg:apk/alpine/gd?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.5-r2"}]}],"versions":["2.0.35-r0","2.0.35-r1","2.0.35-r2","2.0.36_rc1-r0","2.0.36_rc1-r1","2.0.36_rc1-r2","2.0.36_rc1-r3","2.0.36_rc1-r4","2.0.36_rc1-r5","2.0.36_rc1-r6","2.0.36_rc1-r7","2.0.36_rc1-r8","2.0.36_rc1-r9","2.1.0-r0","2.1.0-r1","2.1.1-r0","2.2.1-r0","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.2.4-r1","2.2.4-r2","2.2.5-r0","2.2.5-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-6977.json"}},{"package":{"name":"gd","ecosystem":"Alpine:v3.8","purl":"pkg:apk/alpine/gd?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.5-r2"}]}],"versions":["2.0.35-r0","2.0.35-r1","2.0.35-r2","2.0.36_rc1-r0","2.0.36_rc1-r1","2.0.36_rc1-r2","2.0.36_rc1-r3","2.0.36_rc1-r4","2.0.36_rc1-r5","2.0.36_rc1-r6","2.0.36_rc1-r7","2.0.36_rc1-r8","2.0.36_rc1-r9","2.1.0-r0","2.1.0-r1","2.1.1-r0","2.2.1-r0","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.2.4-r1","2.2.4-r2","2.2.5-r0","2.2.5-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-6977.json"}},{"package":{"name":"gd","ecosystem":"Alpine:v3.9","purl":"pkg:apk/alpine/gd?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.5-r2"}]}],"versions":["2.0.35-r0","2.0.35-r1","2.0.35-r2","2.0.36_rc1-r0","2.0.36_rc1-r1","2.0.36_rc1-r2","2.0.36_rc1-r3","2.0.36_rc1-r4","2.0.36_rc1-r5","2.0.36_rc1-r6","2.0.36_rc1-r7","2.0.36_rc1-r8","2.0.36_rc1-r9","2.1.0-r0","2.1.0-r1","2.1.1-r0","2.2.1-r0","2.2.3-r0","2.2.3-r1","2.2.4-r0","2.2.4-r1","2.2.4-r2","2.2.5-r0","2.2.5-r1"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2019-6977.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"}]}