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.
CVE-2019-6977
Score elevated to 8.9 because EPSS predicts 64% probability of exploitation within the next 30 days (top 0.8% of all CVEs). NVD baseline CVSS 8.8 retained for reference. Confidence: see factors.
- High exploitation likelihood — EPSS 71%
A fix is available — apply it.
- CVSS v3
- 8.8
- EG Score
- 8.9(high)
- EG Risk
- 70(Track)EG Risk 70/100SSVC: Track
EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).
How it’s computedSeverity89% × 45%Exploitation64% × 40%Automatability30% × 15%Action: Routine — remediate on your standard cadence. - EPSS PROB
- 71%
- EPSS %ILE
- 99%
- KEV
- Not listed
Published
January 27, 2019
Last Modified
November 21, 2024
Advisory Details (8)
Auto-updated Aug 19, 2026[SECURITY] [DLA 1651-1] libgd2 security update
https://lists.debian.org/debian-lts-announce/2019/01/msg00028.htmlPHP :: Sec Bug #77270 :: imagecolormatch Out Of Bounds Write on Heap
https://bugs.php.net/bug.php?id=77270Locked Out | Packet Storm
http://packetstormsecurity.com/files/152459/PHP-7.2-imagecolormatch-Out-Of-Band-Heap-Write.htmlPatch Availability(4)
| Vendor / Ecosystem | Fixed in / Patch | Released | Source |
|---|---|---|---|
| ubuntu | libgd3 (2.1.1-4ubuntu0.16.04.11) @ xenial | 2026-05-27 | ubuntu |
| redhat | gd-0:2.2.5-7.el8 | 2020-11-04 | redhat |
| redhat | rh-php72-php-0:7.2.24-1.el7 | 2019-11-01 | redhat |
| redhat | rh-php71-php-0:7.1.30-1.el7 | 2019-08-19 | redhat |
Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.
Affected Packages
(26 across 25 ecosystems)
Debian:8(2)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| libgd2 | 2.1.0-5 ... 2.1.0-5+deb8u9 (12 versions) | 2.1.0-5+deb8u12 | — |
| php5 | 5.6.11+dfsg-1 ... 5.6.9+dfsg-1 (46 versions) | 5.6.40+dfsg-0+deb8u1 | — |
Alpine:v3.10(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| gd | — | 2.2.5-r2 | — |
Alpine:v3.11(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| gd | — | 2.2.5-r2 | — |
Alpine:v3.12(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| gd | — | 2.2.5-r2 | — |
Alpine:v3.13(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| gd | — | 2.2.5-r2 | — |
Alpine:v3.14(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| gd | — | 2.2.5-r2 | — |
Alpine:v3.15(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| gd | — | 2.2.5-r2 | — |
Alpine:v3.16(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| gd | — | 2.2.5-r2 | — |
Alpine:v3.17(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| gd | — | 2.2.5-r2 | — |
Alpine:v3.18(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| gd | — | 2.2.5-r2 | — |
Alpine:v3.19(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| gd | — | 2.2.5-r2 | — |
Alpine:v3.20(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| gd | — | 2.2.5-r2 | — |
Alpine:v3.21(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| gd | — | 2.2.5-r2 | — |
Alpine:v3.22(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| gd | — | 2.2.5-r2 | — |
Alpine:v3.23(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| gd | — | 2.2.5-r2 | — |
Alpine:v3.24(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| gd | — | 2.2.5-r2 | — |
Alpine:v3.6(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| gd | — | 2.2.5-r2 | — |
Alpine:v3.7(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| gd | — | 2.2.5-r2 | — |
Alpine:v3.8(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| gd | — | 2.2.5-r2 | — |
Alpine:v3.9(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| gd | — | 2.2.5-r2 | — |
Debian:11(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| libgd2 | — | 2.2.5-5.1 | — |
Debian:12(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| libgd2 | — | 2.2.5-5.1 | — |
Debian:13(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| libgd2 | — | 2.2.5-5.1 | — |
Debian:14(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| libgd2 | — | 2.2.5-5.1 | — |
Debian:9(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| libgd2 | 2.2.4-2, 2.2.4-2+deb9u1, 2.2.4-2+deb9u2, 2.2.4-2+deb9u3 | 2.2.4-2+deb9u4 | — |
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
All Vendor Advisories
(4)
Every vendor that published an advisory referencing this CVE — pulled from our cve_vendor_advisories aggregation. Click any row for the vendor's original advisory page.
Data Freshness Timeline
(refreshed 4× in last 7d / 17× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
Showing the most recent 100 of 108 total refreshes for this CVE.
- 2026-09-24 13:59 UTCEPSS rescore
- 2026-09-22 14:43 UTCEPSS rescore
- 2026-09-21 20:28 UTCEPSS rescore
- 2026-09-18 19:23 UTCEPSS rescore
- 2026-09-16 14:04 UTCEPSS rescore
- 2026-09-15 03:06 UTCEPSS rescore
- 2026-09-12 14:56 UTCEPSS rescore
- 2026-09-11 14:48 UTCEPSS rescore
- 2026-09-08 21:55 UTCEPSS rescore
- 2026-09-08 18:34 UTCOSV refresh
- 2026-09-06 13:44 UTCEPSS rescore
- 2026-09-05 15:24 UTCEPSS rescore
- 2026-09-04 13:56 UTCEPSS rescore
- 2026-09-01 03:32 UTCEPSS rescore
- 2026-08-30 01:18 UTCEPSS rescore
- 2026-08-27 14:21 UTCEPSS rescore
- 2026-08-26 14:42 UTCEPSS rescore
- 2026-08-22 03:07 UTCOSV refresh
- 2026-08-19 17:00 UTCEPSS rescore
- 2026-08-15 01:26 UTCEPSS rescore
- 2026-08-13 21:57 UTCEPSS rescore
- 2026-08-12 13:47 UTCEPSS rescore
- 2026-08-08 16:33 UTCEPSS rescore
- 2026-08-07 16:23 UTCEPSS rescore
- 2026-08-06 06:54 UTCOSV refresh
Show 75 moreShow fewer
- 2026-08-05 19:13 UTCEPSS rescore
- 2026-08-04 10:34 UTCEPSS rescore
- 2026-08-03 10:32 UTCEPSS rescore
- 2026-08-01 04:12 UTCEPSS rescore
- 2026-07-30 16:24 UTCEPSS rescore
- 2026-07-30 01:27 UTCEPSS rescore
- 2026-07-28 15:32 UTCEPSS rescore
- 2026-07-26 14:51 UTCEPSS rescore
- 2026-07-25 14:14 UTCEPSS rescore
- 2026-07-24 14:14 UTCEPSS rescore
- 2026-07-23 14:15 UTCEPSS rescore
- 2026-07-23 01:46 UTCEG score recompute▲ 0.10
- 2026-07-22 22:28 UTCEG score recompute▼ 0.20
- 2026-07-22 14:05 UTCEPSS rescore
- 2026-07-20 23:32 UTCOSV refresh
- 2026-07-20 17:04 UTCEPSS rescore
- 2026-07-19 14:28 UTCEPSS rescore
- 2026-07-19 14:28 UTCEPSS rescore
- 2026-07-16 16:59 UTCEPSS rescore
- 2026-07-16 16:59 UTCEPSS rescore
- 2026-07-15 16:55 UTCEPSS rescore
- 2026-07-13 22:27 UTCEPSS rescore
- 2026-07-13 22:27 UTCEPSS rescore
- 2026-07-13 06:10 UTCEPSS rescore
- 2026-07-13 06:10 UTCEPSS rescore
- 2026-07-12 05:44 UTCEPSS rescore
- 2026-07-12 05:43 UTCEPSS rescore
- 2026-07-11 08:24 UTCEPSS rescore
- 2026-07-11 08:24 UTCEPSS rescore
- 2026-07-09 19:06 UTCEPSS rescore
- 2026-07-06 16:25 UTCEPSS rescore
- 2026-07-06 16:25 UTCEPSS rescore
- 2026-07-04 06:28 UTCEPSS rescore
- 2026-07-03 18:56 UTCOSV refresh
- 2026-07-01 15:03 UTCEPSS rescore
- 2026-07-01 15:03 UTCEPSS rescore
- 2026-06-30 23:20 UTCEPSS rescore
- 2026-06-29 14:03 UTCEPSS rescore
- 2026-06-28 14:04 UTCEPSS rescore
- 2026-06-27 03:06 UTCEPSS rescore
- 2026-06-25 13:47 UTCEPSS rescore
- 2026-06-25 13:47 UTCEPSS rescore
- 2026-06-24 14:03 UTCEPSS rescore
- 2026-06-24 14:03 UTCEPSS rescore
- 2026-06-23 21:31 UTCEPSS rescore
- 2026-06-23 21:31 UTCEPSS rescore
- 2026-06-21 01:57 UTCEPSS rescore
- 2026-06-21 01:57 UTCEPSS rescore
- 2026-06-18 17:50 UTCEPSS rescore
- 2026-06-18 17:50 UTCEPSS rescore
- 2026-06-17 17:50 UTCEPSS rescore
- 2026-06-16 17:50 UTCEPSS rescore
- 2026-06-15 17:46 UTCEPSS rescore
- 2026-06-15 06:43 UTCOSV refresh
- 2026-06-14 23:15 UTCEPSS rescore
- 2026-06-14 23:15 UTCEPSS rescore
- 2026-06-13 22:58 UTCEPSS rescore
- 2026-06-12 23:09 UTCEPSS rescore
- 2026-06-12 23:09 UTCEPSS rescore
- 2026-06-11 13:58 UTCEPSS rescore
- 2026-06-10 22:16 UTCEPSS rescore
- 2026-06-10 22:16 UTCEPSS rescore
- 2026-06-10 13:19 UTCEPSS rescore
- 2026-06-08 14:15 UTCEPSS rescore
- 2026-06-08 14:15 UTCEPSS rescore
- 2026-06-08 14:15 UTCEPSS rescore
- 2026-06-07 15:23 UTCEPSS rescore
- 2026-06-07 15:23 UTCEPSS rescore
- 2026-06-04 13:10 UTCEPSS rescore
- 2026-06-04 13:10 UTCEPSS rescore
- 2026-05-31 22:29 UTCEPSS rescore
- 2026-05-31 22:29 UTCEPSS rescore
- 2026-05-29 13:42 UTCEPSS rescore
- 2026-05-28 13:43 UTCEPSS rescore
- 2026-05-28 13:43 UTCEPSS rescore
Publicly available exploits
(1 reference)Working exploit code is in the public domain (1 Exploit-DB entry). Defenders should treat patch urgency accordingly — public PoCs typically lead to mass-exploitation within 24-72 hours.
- Exploit-DBEDB-46677First seen Feb 27, 2019
PHP 7.2 - 'imagecolormatch()' Out of Band Heap Write
Open source ↗
Related CVEs(same product + same vendor + same CWE)
Same product
10 shownAlpine:v3.7:gd · Alpine:v3.10:gd · Alpine:v3.11:gd
Same vendor
10 shownredhat:RHSA-2019:2519 · redhat:RHSA-2020:4659
- CVE-2019-9023EG 9.8EPSS p95CRITICAL
- CVE-2019-9021EG 9.8EPSS p95CRITICAL
- CVE-2019-9020EG 9.8EPSS p95CRITICAL
- CVE-2019-6978EG 9.8EPSS p91CRITICAL
- CVE-2016-10166EG 9.8EPSS p96CRITICAL
- CVE-2019-11040EG 9.1EPSS p90CRITICAL
- CVE-2019-11039EG 9.1CRITICAL
- CVE-2019-11036EG 9.1EPSS p94CRITICAL
- CVE-2019-11035EG 9.1EPSS p91CRITICAL
- CVE-2019-11034EG 9.1EPSS p90CRITICAL
Frequently asked(5)
What is CVE-2019-6977?
When was CVE-2019-6977 disclosed?
Is CVE-2019-6977 actively exploited?
What is the CVSS score of CVE-2019-6977?
How do I remediate CVE-2019-6977?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2019-6977
Is Your Infrastructure Affected by CVE-2019-6977?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.