Read the docs
TI-2019-04913 Aliases CVE-2019-6977GHSA-3jrx-xgc5-h2f9

gdImageColorMatch in gd_color_match.c in the GD Graphics Library (aka LibGD) 2.2.5, as…

Priority HIGH 76CWE-787Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Partial Red Hat: 7 fixed, 4 without a fix

Attack profile from CVSS 3.0 · NVD. Fix status from CNA and Red Hat. Impact type from CWE-787 and the CVSS impact.

Summary

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.

Why it matters now

EPSS 0.71496 99th percentileScored 2026-11-07
Public exploit Yes 2 exploit referencesTagged by NVD and the CNA
Fix Partial Red Hat: 3 advisoriesRed Hat: 7 fixed, 4 without a fix

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
——all versions—No fix listedCNA
  • — Vendor— Affected all versions Fixed in — No fix listed CNA

CPE configurations NVD · 10

CPEVersionsRoleVendor
cpe:2.3:a:libgd:libgd:2.2.5:*:*:*:*:*:*:*2.2.5VulnerableLibgd
cpe:2.3:a:php:php:*:*:*:*:*:*:*:*before 5.6.40; 7.0.0 to before 7.1.26; 7.2.0 to before 7.2.14VulnerablePHP
cpe:2.3:a:php:php:7.3.0:*:*:*:*:*:*:*7.3.0VulnerablePHP
cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*8.0VulnerableDebian
cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*9.0VulnerableDebian
cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*14.04VulnerableCanonical
cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*16.04VulnerableCanonical
cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*18.04VulnerableCanonical
cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*18.10VulnerableCanonical
cpe:2.3:a:netapp:storage_automation_store:*:*:*:*:*:*:*:*all versionsVulnerableNetApp
  • cpe:2.3:a:libgd:libgd:2.2.5:*:*:*:*:*:*:* Versions 2.2.5 Vulnerable ·Libgd
  • cpe:2.3:a:php:php:*:*:*:*:*:*:*:* Versions before 5.6.40; 7.0.0 to before 7.1.26; 7.2.0 to before 7.2.14 Vulnerable ·PHP
  • cpe:2.3:a:php:php:7.3.0:*:*:*:*:*:*:* Versions 7.3.0 Vulnerable ·PHP
  • cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:* Versions 8.0 Vulnerable ·Debian
  • cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* Versions 9.0 Vulnerable ·Debian
  • cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:* Versions 14.04 Vulnerable ·Canonical
  • cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:* Versions 16.04 Vulnerable ·Canonical
  • cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:* Versions 18.04 Vulnerable ·Canonical
  • cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:* Versions 18.10 Vulnerable ·Canonical
  • cpe:2.3:a:netapp:storage_automation_store:*:*:*:*:*:*:*:* Versions all versions Vulnerable ·NetApp

Remediation

Red Hat 3 advisories

  • RHSA-2020:4659 Released 2020-11-04 · Red Hat rating Moderate
    gd security update
    • Red Hat Enterprise Linux AppStream (v. 8) gd-2.2.5-7.el8, gd-devel-2.2.5-7.el8
  • RHSA-2019:3299 Released 2019-11-01 · Red Hat rating Critical
    rh-php72-php security update
    • Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-php72-php-7.2.24-1.el7, rh-php72-php-bcmath-7.2.24-1.el7, rh-php72-php-cli-7.2.24-1.el7 +26
    • Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.5) rh-php72-php-7.2.24-1.el7, rh-php72-php-bcmath-7.2.24-1.el7, rh-php72-php-cli-7.2.24-1.el7 +26
    • Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) rh-php72-php-7.2.24-1.el7, rh-php72-php-bcmath-7.2.24-1.el7, rh-php72-php-cli-7.2.24-1.el7 +26
    • Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) rh-php72-php-7.2.24-1.el7, rh-php72-php-bcmath-7.2.24-1.el7, rh-php72-php-cli-7.2.24-1.el7 +26
    • Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-php72-php-7.2.24-1.el7, rh-php72-php-bcmath-7.2.24-1.el7, rh-php72-php-cli-7.2.24-1.el7 +26
  • RHSA-2019:2519 Released 2019-08-19 · Red Hat rating Moderate
    rh-php71-php security, bug fix, and enhancement update
    • Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-php71-php-7.1.30-1.el7, rh-php71-php-bcmath-7.1.30-1.el7, rh-php71-php-cli-7.1.30-1.el7 +26
    • Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.4) rh-php71-php-7.1.30-1.el7, rh-php71-php-bcmath-7.1.30-1.el7, rh-php71-php-cli-7.1.30-1.el7 +26
    • Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.5) rh-php71-php-7.1.30-1.el7, rh-php71-php-bcmath-7.1.30-1.el7, rh-php71-php-cli-7.1.30-1.el7 +26
    • Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) rh-php71-php-7.1.30-1.el7, rh-php71-php-bcmath-7.1.30-1.el7, rh-php71-php-cli-7.1.30-1.el7 +26
    • Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-php71-php-7.1.30-1.el7, rh-php71-php-bcmath-7.1.30-1.el7, rh-php71-php-cli-7.1.30-1.el7 +26

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat Enterprise Linux 5AffectedNo fix planned: Will not fix
Red Hat Enterprise Linux 6AffectedNo fix planned: Will not fix
Red Hat Enterprise Linux 7AffectedNo fix planned: Will not fix
Red Hat Software CollectionsAffectedNo fix planned: Will not fix
Red Hat Enterprise Linux AppStream (v. 8)Fixed RHSA-2020:4659
Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7)Fixed RHSA-2019:2519, RHSA-2019:3299
Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.4)Fixed RHSA-2019:2519
Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.5)Fixed RHSA-2019:2519, RHSA-2019:3299
Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6)Fixed RHSA-2019:2519, RHSA-2019:3299
Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7)Fixed RHSA-2019:3299
Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7)Fixed RHSA-2019:2519, RHSA-2019:3299
Not affected: 2 products
  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8

Timeline

  1. 2026-10-02 Threatist record created from CVE-2019-6977
  2. 2026-10-03 Alias added: GHSA-3jrx-xgc5-h2f9

References

Sources