Public exploit available
Public proof-of-concept or exploit code exists (ExploitDB / Metasploit / Nuclei).

CVE-2019-6977Out-of-bounds Write in Libgd

Severity
8.8HIGHNVD
EPSS
86.3%
top 0.59%
CISA KEV
Not in KEV
Exploit
PoC available
Public exploit / PoC exists
Timeline
PublishedJan 27
Latest updateMay 13

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.

CVSS vector

CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HExploitability: 2.8 | Impact: 5.9

Affected Packages2 packages

NVDlibgd/libgd2.2.5
NVDphp/php7.0.07.1.26+3

Also affects: Debian Linux 8.0, 9.0, Ubuntu Linux 14.04, 16.04, 18.04, 18.10

Patches

🔴Vulnerability Details

3
GHSA
GHSA-3jrx-xgc5-h2f9: gdImageColorMatch in gd_color_match2022-05-13
OSV
CVE-2019-6977: gdImageColorMatch in gd_color_match2019-01-27
CVEList
CVE-2019-6977: gdImageColorMatch in gd_color_match2019-01-27

💥Exploits & PoCs

1
Exploit-DB
PHP 7.2 - 'imagecolormatch()' Out of Band Heap Write2019-02-27

📋Vendor Advisories

3
Ubuntu
GD vulnerabilities2019-02-28
Debian
CVE-2019-6977: libgd2 - gdImageColorMatch in gd_color_match.c in the GD Graphics Library (aka LibGD) 2.2...2019
Red Hat
gd: Heap-based buffer overflow in gdImageColorMatch() in gd_color_match.c2018-12-09

💬Community

5
HackerOne
Apache HTTP [2.4.17-2.4.38] Local Root Privilege Escalation2019-09-11
Bugzilla
CVE-2019-6977 gd: Heap-based buffer overflow in gdImageColorMatch() in gd_color_match.c2019-02-04
Bugzilla
CVE-2019-6977 libwmf: gd: heap based buffer overflow in gd_color_match.c:gdImageColorMatch() in libgd as used in imagecolormatch() [fedora-all]2019-02-04
Bugzilla
CVE-2019-6977 gd: heap based buffer overflow in gd_color_match.c:gdImageColorMatch() in libgd as used in imagecolormatch() [fedora-all]2019-02-04
Bugzilla
CVE-2019-6977 php: gd: heap based buffer overflow in gd_color_match.c:gdImageColorMatch() in libgd as used in imagecolormatch() [fedora-all]2019-02-04