CVE-2019-6977

Exp

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-27 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2019-6977 is rated High Exploit Risk (86.6/100): CVSS High severity, with high exploitation likelihood (EPSS 87.88%, 99th percentile). Core evidence: 2 public exploit reference(s) are indexed (Exploit-DB). EPSS rose +1.58% over the last day, indicating growing attacker interest. Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2019-6977

EDB-ID Source Kind Published Link
46677 exploit_db edb 2019-02-27 Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2019-6977

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-05-13 86.30% 87.88% +1.58%
2 2026-03-18 87.33% 86.30% -1.03%
3 2026-03-04 87.33%

Full EPSS history (51 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2019-6977

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
8.8 3.0 HIGH
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
2.8 5.9 [email protected]
6.8 2.0 MEDIUM
AV:N/AC:M/Au:N/C:P/I:P/A:P Click to expand
Access vector (AV:N)
Can be exploited remotely over network reachability.
Access complexity (AC:M)
Exploitation needs some favorable conditions, but not exceptional ones.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:P)
Partial confidentiality impact.
Integrity impact (I:P)
Partial integrity impact.
Availability impact (A:P)
Partial availability impact.
8.6 6.4 [email protected]

Weakness enumeration for CVE-2019-6977

OS Trackers for CVE-2019-6977

vendor priority summary link
alpine high CVE-2019-6977: 1 source package rows (gd); 10 state rows across 10 repos (3.10-main, 3.11-main, 3.12-main, 3.17-main, 3.18-main, 3.19-main, 3.20-main, 3.21-main, 3.22-main, edge-main); fixed 10, open 0. https://security.alpinelinux.org/vuln/CVE-2019-6977
debian not yet assigned CVE-2019-6977 not yet assigned priority: Debian including 1 source packages (libgd2), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2019-6977
gentoo normal CVE-2019-6977: 1 GLSA(s) (201903-18), 1 atom(s) (media-libs/gd); latest impact normal. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2019-6977
redhat medium https://access.redhat.com/security/cve/CVE-2019-6977
suse medium https://www.suse.com/security/cve/CVE-2019-6977/
ubuntu medium CVE-2019-6977 medium priority: Ubuntu including 5 source packages (libgd2, php5, php7.0, php7.2, php7.3), 25 status rows across 5 suites (bionic, cosmic, trusty, upstream, xenial): DNE 12, needs-triage 5, not-affected 4, released 4. https://ubuntu.com/security/CVE-2019-6977

Affected software / configurations for CVE-2019-6977

Vendor Product Version Raw CPE
libgd libgd 2.2.5 cpe:2.3:a:libgd:libgd:2.2.5:*:*:*:*:*:*:*
php php < 5.6.40 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
php php >= 7.0.0, < 7.1.26 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
php php >= 7.2.0, < 7.2.14 cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
php php 7.3.0 cpe:2.3:a:php:php:7.3.0:*:*:*:*:*:*:*
debian debian_linux 8.0 cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*
debian debian_linux 9.0 cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
canonical ubuntu_linux 14.04 cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*
canonical ubuntu_linux 16.04 cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*
canonical ubuntu_linux 18.04 cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*
canonical ubuntu_linux 18.10 cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*
netapp storage_automation_store cpe:2.3:a:netapp:storage_automation_store:*:*:*:*:*:*:*:*

References for CVE-2019-6977

URL Tags
http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00025.html
http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00031.html
http://packetstormsecurity.com/files/152459/PHP-7.2-imagecolormatch-Out-Of-Band-Heap-Write.html
http://php.net/ChangeLog-5.php Release Notes Vendor Advisory
http://php.net/ChangeLog-7.php Release Notes Vendor Advisory
http://www.securityfocus.com/bid/106731 Third Party Advisory VDB Entry
https://access.redhat.com/errata/RHSA-2019:2519
https://access.redhat.com/errata/RHSA-2019:3299
https://bugs.php.net/bug.php?id=77270 Exploit Issue Tracking Mailing List Vendor Advisory
https://lists.debian.org/debian-lts-announce/2019/01/msg00028.html Mailing List Third Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3CZ2QADQTKRHTGB2AHD7J4QQNDLBEMM6/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3WRUPZVT2MWFUEMVGTRAGDOBHLNMGK5R/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TEYUUOW75YD3DENIPYMO263E6NL2NFHI/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TTXSLRZI5BCQT3H5KALG3DHUWUMNPDX2/
https://security.gentoo.org/glsa/201903-18 Third Party Advisory
https://security.netapp.com/advisory/ntap-20190315-0003/ Patch Third Party Advisory
https://usn.ubuntu.com/3900-1/ Third Party Advisory
https://www.debian.org/security/2019/dsa-4384 Third Party Advisory
https://www.exploit-db.com/exploits/46677/
cvelogic Threat Intelligence