gd: Heap-based buffer overflow in gdImageColorMatch() in gd_color_match.c
Published Jan 27, 2019
8.8
HIGHCVSS 3.0
EPSS 71.50%
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.
Affected products
No data.
Configuration 2
Configuration 3
- 8.0
- 9.0
Configuration 4
- 14.04
- 16.04
- 18.04
- 18.10
Configuration 5
- n/a
No data.
Red Hat Enterprise Linux 8
gd-0:2.2.5-7.el8
Fixed · RHSA-2020:4659
Red Hat Software Collections for Red Hat Enterprise Linux 7
rh-php71-php-0:7.1.30-1.el7
Fixed · RHSA-2019:2519
Red Hat Software Collections for Red Hat Enterprise Linux 7
rh-php72-php-0:7.2.24-1.el7
Fixed · RHSA-2019:3299
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
rh-php71-php-0:7.1.30-1.el7
Fixed · RHSA-2019:2519
Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS
rh-php71-php-0:7.1.30-1.el7
Fixed · RHSA-2019:2519
Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS
rh-php72-php-0:7.2.24-1.el7
Fixed · RHSA-2019:3299
Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS
rh-php71-php-0:7.1.30-1.el7
Fixed · RHSA-2019:2519
Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS
rh-php72-php-0:7.2.24-1.el7
Fixed · RHSA-2019:3299
Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS
rh-php72-php-0:7.2.24-1.el7
Fixed · RHSA-2019:3299
Red Hat Enterprise Linux 5
gd
Will not fix
Red Hat Enterprise Linux 5
php
Will not fix
Red Hat Enterprise Linux 5
php53
Will not fix
Red Hat Enterprise Linux 6
gd
Will not fix
Red Hat Enterprise Linux 6
php
Will not fix
Red Hat Enterprise Linux 7
gd
Not affected
Red Hat Enterprise Linux 7
php
Will not fix
Red Hat Enterprise Linux 8
php:7.2/php
Not affected
Red Hat Software Collections
rh-php70-php
Will not fix
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 8 | gd-0:2.2.5-7.el8 | Fixed | RHSA-2020:4659 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7 | rh-php71-php-0:7.1.30-1.el7 | Fixed | RHSA-2019:2519 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7 | rh-php72-php-0:7.2.24-1.el7 | Fixed | RHSA-2019:3299 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS | rh-php71-php-0:7.1.30-1.el7 | Fixed | RHSA-2019:2519 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS | rh-php71-php-0:7.1.30-1.el7 | Fixed | RHSA-2019:2519 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS | rh-php72-php-0:7.2.24-1.el7 | Fixed | RHSA-2019:3299 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS | rh-php71-php-0:7.1.30-1.el7 | Fixed | RHSA-2019:2519 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS | rh-php72-php-0:7.2.24-1.el7 | Fixed | RHSA-2019:3299 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS | rh-php72-php-0:7.2.24-1.el7 | Fixed | RHSA-2019:3299 |
| Red Hat Enterprise Linux 5 | gd | Will not fix | n/a |
| Red Hat Enterprise Linux 5 | php | Will not fix | n/a |
| Red Hat Enterprise Linux 5 | php53 | Will not fix | n/a |
| Red Hat Enterprise Linux 6 | gd | Will not fix | n/a |
| Red Hat Enterprise Linux 6 | php | Will not fix | n/a |
| Red Hat Enterprise Linux 7 | gd | Not affected | n/a |
| Red Hat Enterprise Linux 7 | php | Will not fix | n/a |
| Red Hat Enterprise Linux 8 | php:7.2/php | Not affected | n/a |
| Red Hat Software Collections | rh-php70-php | Will not fix | n/a |
No package ranges for this CVE.
Remediation
No remediation recorded yet.
Metrics
No CVSS v4.0 score for this CVE.
No CVSS v3.1 score for this CVE.
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
1 other source (Red Hat) ▾
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
AV:N/AC:M/Au:N/C:P/I:P/A:P
This CVE is not in the KEV list.
No CISA SSVC assessment for this CVE yet.
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 1, 2026.
Score over time
2021–2026- EPSS v1
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Percentile over time
- EPSS v1
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Table of values (45 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 1, 2026 | 71.50% (0.71496) | 99.40th | v5 (v2026.06.15) |
| Sep 22, 2026 | 71.50% (0.71496) | 99.39th | v5 (v2026.06.15) |
| Sep 21, 2026 | 62.09% (0.62089) | 99.17th | v5 (v2026.06.15) |
| Sep 6, 2026 | 71.50% (0.71496) | 99.37th | v5 (v2026.06.15) |
| Sep 5, 2026 | 62.09% (0.62089) | 99.15th | v5 (v2026.06.15) |
| Aug 30, 2026 | 71.50% (0.71496) | 99.37th | v5 (v2026.06.15) |
| Aug 28, 2026 | 62.09% (0.62089) | 99.14th | v5 (v2026.06.15) |
| Aug 24, 2026 | 71.50% (0.71496) | 99.37th | v5 (v2026.06.15) |
| Aug 23, 2026 | 62.09% (0.62089) | 99.14th | v5 (v2026.06.15) |
| Jun 15, 2026 | 65.12% (0.65116) | 99.15th | v5 (v2026.06.15) |
| May 13, 2026 | 87.88% (0.87883) | 99.48th | v4 (v2025.03.14) |
| Mar 1, 2026 | 86.55% (0.86552) | 99.41th | v4 (v2025.03.14) |
| Dec 28, 2025 | 87.77% (0.87771) | 99.44th | v4 (v2025.03.14) |
| Dec 27, 2025 | 89.95% (0.89955) | 99.56th | v4 (v2025.03.14) |
| Dec 10, 2025 | 87.77% (0.87771) | 99.44th | v4 (v2025.03.14) |
| Nov 21, 2025 | 89.07% (0.89071) | 99.50th | v4 (v2025.03.14) |
| Nov 18, 2025 | 79.15% (0.79152) | 99.14th | v4 (v2025.03.14) |
| Nov 1, 2025 | 88.46% (0.88457) | 99.48th | v4 (v2025.03.14) |
| Oct 27, 2025 | 90.02% (0.90016) | 99.55th | v4 (v2025.03.14) |
| Oct 1, 2025 | 88.46% (0.88457) | 99.49th | v4 (v2025.03.14) |
| Jun 4, 2025 | 89.56% (0.89556) | 99.52th | v4 (v2025.03.14) |
| Jun 1, 2025 | 88.29% (0.88288) | 99.46th | v4 (v2025.03.14) |
| May 4, 2025 | 89.49% (0.89489) | 99.51th | v4 (v2025.03.14) |
| May 1, 2025 | 88.29% (0.88288) | 99.45th | v4 (v2025.03.14) |
| Mar 17, 2025 | 89.49% (0.89489) | 99.54th | v4 (v2025.03.14) |
| Dec 17, 2024 | 58.20% (0.58196) | 97.85th | v3 (v2023.03.01) |
| Jun 19, 2024 | 71.41% (0.71411) | 98.08th | v3 (v2023.03.01) |
| May 7, 2024 | 72.29% (0.72293) | 98.06th | v3 (v2023.03.01) |
| Mar 15, 2024 | 77.10% (0.77096) | 98.12th | v3 (v2023.03.01) |
| Feb 25, 2024 | 83.04% (0.83040) | 98.33th | v3 (v2023.03.01) |
| Feb 7, 2024 | 82.63% (0.82628) | 98.16th | v3 (v2023.03.01) |
| Jan 20, 2024 | 84.70% (0.84701) | 98.24th | v3 (v2023.03.01) |
| Jan 5, 2024 | 84.69% (0.84691) | 98.23th | v3 (v2023.03.01) |
| Dec 18, 2023 | 87.45% (0.87446) | 98.35th | v3 (v2023.03.01) |
| Aug 9, 2023 | 89.73% (0.89727) | 98.33th | v3 (v2023.03.01) |
| Jul 9, 2023 | 88.75% (0.88755) | 98.23th | v3 (v2023.03.01) |
| Jun 9, 2023 | 89.88% (0.89880) | 98.27th | v3 (v2023.03.01) |
| May 7, 2023 | 89.01% (0.89012) | 98.17th | v3 (v2023.03.01) |
| Mar 7, 2023 | 91.19% (0.91189) | 98.26th | v3 (v2023.03.01) |
| Mar 6, 2023 | 38.05% (0.38053) | 97.95th | v2 (v2022.01.01) |
| Feb 4, 2022 | 38.05% (0.38053) | 97.22th | v2 (v2022.01.01) |
| Feb 3, 2022 | 16.00% (0.16004) | 90.20th | v1 |
| Jan 6, 2022 | 16.00% (0.16004) | 90.09th | v1 |
| Sep 1, 2021 | 16.00% (0.16004) | 97.33th | v1 |
| Apr 14, 2021 | 16.00% (0.16004) | 0.00th | v1 |
References (23)
- http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00025.html vendor-advisoryx_refsource_SUSE
- http://lists.opensuse.org/opensuse-security-announce/2019-04/msg00031.html vendor-advisoryx_refsource_SUSE
- http://packetstormsecurity.com/files/152459/PHP-7.2-imagecolormatch-Out-Of-Band-Heap-Write.html x_refsource_MISC
- http://php.net/ChangeLog-5.php x_refsource_MISCRelease NotesVendor Advisory
- http://php.net/ChangeLog-7.php x_refsource_MISCRelease NotesVendor Advisory
- http://www.securityfocus.com/bid/106731 vdb-entryx_refsource_BIDThird Party AdvisoryVDB Entry
- https://access.redhat.com/errata/RHSA-2019:2519 vendor-advisoryx_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2019:3299 vendor-advisoryx_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2019-6977 Vendor Advisory
- https://bugs.php.net/bug.php?id=77270 x_refsource_MISCExploitIssue TrackingMailing ListVendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=1672207 Issue Tracking
- https://lists.debian.org/debian-lts-announce/2019/01/msg00028.html mailing-listx_refsource_MLISTMailing ListThird Party Advisory
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3CZ2QADQTKRHTGB2AHD7J4QQNDLBEMM6/ vendor-advisoryx_refsource_FEDORA
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3WRUPZVT2MWFUEMVGTRAGDOBHLNMGK5R/ vendor-advisoryx_refsource_FEDORA
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TEYUUOW75YD3DENIPYMO263E6NL2NFHI/ vendor-advisoryx_refsource_FEDORA
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/TTXSLRZI5BCQT3H5KALG3DHUWUMNPDX2/ vendor-advisoryx_refsource_FEDORA
- https://nvd.nist.gov/vuln/detail/CVE-2019-6977
- https://security.gentoo.org/glsa/201903-18 vendor-advisoryx_refsource_GENTOOThird Party Advisory
- https://security.netapp.com/advisory/ntap-20190315-0003/ x_refsource_CONFIRMPatchThird Party Advisory
- https://usn.ubuntu.com/3900-1/ vendor-advisoryx_refsource_UBUNTUThird Party Advisory
- https://www.cve.org/CVERecord?id=CVE-2019-6977
- https://www.debian.org/security/2019/dsa-4384 vendor-advisoryx_refsource_DEBIANThird Party Advisory
- https://www.exploit-db.com/exploits/46677/ exploitx_refsource_EXPLOIT-DB
Change history (0)
No recorded changes yet.