CVE-2019-6977
CWE-787Published: January 27, 2019· Updated: Jun 17, 2026
Official 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.
Technical Analysis
CVE-2019-6977 can be exploited remotely over the network without requiring physical or adjacent access, significantly expanding the attack surface for threat actors.
Exploitation does not require any privileges, though user interaction (Required) is needed, which slightly reduces the risk of mass automated attacks.
A successful exploit results in complete confidentiality breach (data exposure), full integrity compromise (data manipulation), availability disruption (denial of service), with a CVSS base score of 8.8.
A proof-of-concept (PoC) exploit exists for CVE-2019-6977. While not yet confirmed in active campaigns, the availability of PoC code increases exploitation risk substantially.
From a weakness classification perspective (CWE-787): Out-of-bounds write vulnerabilities can lead to data corruption, crashes, or arbitrary code execution.
CVSS v3.1 Vector Breakdown
Affected Vendors & Products
Exploit & PoC Resources
Official Patches & Advisories
All References (38)
Quick Facts
Related CVEs (CWE-787)
Recommended Actions
- →Apply vendor patches immediately
- →Monitor CVE-2019-6977 in threat intel feeds
- →Review IDS/IPS signatures for exploitation attempts