CVE-2019-6977: Buffer Overflow
Fixed bug (imagecolormatch Out Of Bounds Write on Heap). (CVE-2019-6977)
Other sources
gdImageColorMatch in gdcolormatch.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 Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/gdto a version that resolves this vulnerability.Fixed in 0:2.2.5-7.el8 - Upgrade
Upgrade
redhat/rh-php71-phpto a version that resolves this vulnerability.Fixed in 0:7.1.30-1.el7 - Upgrade
Upgrade
redhat/rh-php72-phpto a version that resolves this vulnerability.Fixed in 0:7.2.24-1.el7 - Upgrade
Upgrade
debian/libgd2to a version that resolves this vulnerability.Fixed in 2.2.5-5.1Fixed in 2.2.4-2+deb9u4 - Upgrade
Upgrade
redhat/phpto a version that resolves this vulnerability.Fixed in 5.6.40 - Upgrade
Upgrade
redhat/phpto a version that resolves this vulnerability.Fixed in 7.1.26 - Upgrade
Upgrade
redhat/phpto a version that resolves this vulnerability.Fixed in 7.2.14 - Upgrade
Upgrade
redhat/phpto a version that resolves this vulnerability.Fixed in 7.3.1 - Upgrade
Upgrade
PHPto a version that resolves this vulnerability.Fixed in 7.1.26 - Upgrade
Upgrade
debian/libgd2to a version that resolves this vulnerability.Fixed in 2.3.0-2Fixed in 2.3.0-2+deb11u1Fixed in 2.3.3-9Fixed in 2.3.3-13 - Upgrade
Upgrade
alpine/gdto a version that resolves this vulnerability.Fixed in 2.2.5-r2 - Upgrade
Upgrade
alpine/php7to a version that resolves this vulnerability.Fixed in 7.1.29-r0 - Upgrade
Upgrade
PHP 5.6.xto a version that resolves this vulnerability.Fixed in 5.6.40 - Upgrade
Upgrade
PHP 7.1.xto a version that resolves this vulnerability.Fixed in 7.1.26 - Upgrade
Upgrade
PHP 7.2.xto a version that resolves this vulnerability.Fixed in 7.2.14 - Upgrade
Upgrade
PHP 7.3.xto a version that resolves this vulnerability.Fixed in 7.3.1
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is CVE-2019-6977?
CVE-2019-6977 is a vulnerability in the GD Graphics Library (LibGD) that allows an attacker to trigger a heap-based buffer overflow.
Which software versions are affected by CVE-2019-6977?
CVE-2019-6977 affects PHP versions 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, as well as LibGD version 2.2.5.
How severe is CVE-2019-6977?
CVE-2019-6977 has a severity score of 8.8 (high).
How can I fix CVE-2019-6977?
To fix CVE-2019-6977, update your PHP version to 5.6.40 or later, 7.1.26 or later, 7.2.14 or later, or 7.3.1 or later. Additionally, update your LibGD version to 2.2.5-7.el8 or later.
Where can I find more information about CVE-2019-6977?
You can find more information about CVE-2019-6977 at the following references: [link1], [link2], [link3].