
CVE catalog
CVE-2019-6977
libgd2: CVE-2019-6977
- Severity
- Medium · CVSS 6.5
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 71.50% · Oct 25, 2026
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.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | libgd2 | sid | 2.3.3-14 | fixed |
| Debian | libgd2 | forky | 2.3.3-14 | fixed |
| Debian | libgd2 | trixie | 2.3.3-14~deb13u1 | fixed |
| Debian | libgd2 | trixie-security | 2.3.3-14~deb13u1 | fixed |
| Debian | libgd2 | bookworm | 2.3.3-9 | fixed |
| Debian | libgd2 | bookworm-security | 2.3.3-9+deb12u1 | fixed |
| Alpine | gd | 3.10 | 2.2.5-r2 | fixed |
| Alpine | gd | 3.11 | 2.2.5-r2 | fixed |
| Alpine | gd | 3.12 | 2.2.5-r2 | fixed |
| Alpine | gd | 3.13 | 2.2.5-r2 | fixed |
| Alpine | gd | 3.14 | 2.2.5-r2 | fixed |
| Alpine | gd | 3.15 | 2.2.5-r2 | fixed |
| Alpine | gd | 3.16 | 2.2.5-r2 | fixed |
| Alpine | gd | 3.17 | 2.2.5-r2 | fixed |
| Alpine | gd | 3.18 | 2.2.5-r2 | fixed |
| Alpine | gd | 3.19 | 2.2.5-r2 | fixed |
| Alpine | gd | 3.20 | 2.2.5-r2 | fixed |
| Alpine | gd | 3.21 | 2.2.5-r2 | fixed |
| Alpine | gd | 3.22 | 2.2.5-r2 | fixed |
| Alpine | gd | 3.23 | 2.2.5-r2 | fixed |
| Alpine | gd | 3.24 | 2.2.5-r2 | fixed |
| Alpine | gd | 3.6 | 2.2.5-r2 | fixed |
| Alpine | gd | 3.7 | 2.2.5-r2 | fixed |
| Alpine | gd | 3.8 | 2.2.5-r2 | fixed |
| Alpine | gd | 3.9 | 2.2.5-r2 | fixed |
| Ubuntu | libgd2 | 14.04 | 2.1.0-2 | vulnerable |
| Ubuntu | libgd2 | 14.04 | 2.1.0-3 | vulnerable |
| Ubuntu | libgd2 | 14.04 | 2.1.0-3ubuntu0.1 | vulnerable |
| Ubuntu | libgd2 | 14.04 | 2.1.0-3ubuntu0.2 | vulnerable |
| Ubuntu | libgd2 | 14.04 | 2.1.0-3ubuntu0.3 | vulnerable |
| Ubuntu | libgd2 | 14.04 | 2.1.0-3ubuntu0.5 | vulnerable |
| Ubuntu | libgd2 | 14.04 | 2.1.0-3ubuntu0.6 | vulnerable |
| Ubuntu | libgd2 | 14.04 | 2.1.0-3ubuntu0.7 | vulnerable |
| Ubuntu | libgd2 | 14.04 | 2.1.0-3ubuntu0.8 | vulnerable |
| Ubuntu | libgd2 | 14.04 | 2.1.0-3ubuntu0.10 | vulnerable |
| Ubuntu | libgd2 | 14.04 | 2.1.0-3ubuntu0.11 | fixed |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4build1 | vulnerable |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4build2 | vulnerable |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4ubuntu0.16.04.1 | vulnerable |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4ubuntu0.16.04.2 | vulnerable |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4ubuntu0.16.04.3 | vulnerable |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4ubuntu0.16.04.5 | vulnerable |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4ubuntu0.16.04.6 | vulnerable |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4ubuntu0.16.04.7 | vulnerable |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4ubuntu0.16.04.8 | vulnerable |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4ubuntu0.16.04.10 | vulnerable |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4ubuntu0.16.04.11 | fixed |
| Ubuntu | libgd2 | 18.04 | 2.2.5-3 | vulnerable |
| Ubuntu | libgd2 | 18.04 | 2.2.5-4 | vulnerable |
| Ubuntu | libgd2 | 18.04 | 2.2.5-4ubuntu0.2 | vulnerable |
| Ubuntu | libgd2 | 18.04 | 2.2.5-4ubuntu0.3 | fixed |
| Ubuntu | libgd2 | 14.04 | 2.1.0-2 | vulnerable |
| Ubuntu | libgd2 | 14.04 | 2.1.0-3 | vulnerable |
| Ubuntu | libgd2 | 14.04 | 2.1.0-3ubuntu0.1 | vulnerable |
| Ubuntu | libgd2 | 14.04 | 2.1.0-3ubuntu0.2 | vulnerable |
| Ubuntu | libgd2 | 14.04 | 2.1.0-3ubuntu0.3 | vulnerable |
| Ubuntu | libgd2 | 14.04 | 2.1.0-3ubuntu0.5 | vulnerable |
| Ubuntu | libgd2 | 14.04 | 2.1.0-3ubuntu0.6 | vulnerable |
| Ubuntu | libgd2 | 14.04 | 2.1.0-3ubuntu0.7 | vulnerable |
| Ubuntu | libgd2 | 14.04 | 2.1.0-3ubuntu0.8 | vulnerable |
| Ubuntu | libgd2 | 14.04 | 2.1.0-3ubuntu0.10 | vulnerable |
| Ubuntu | libgd2 | 14.04 | 2.1.0-3ubuntu0.11 | fixed |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4build1 | vulnerable |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4build2 | vulnerable |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4ubuntu0.16.04.1 | vulnerable |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4ubuntu0.16.04.2 | vulnerable |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4ubuntu0.16.04.3 | vulnerable |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4ubuntu0.16.04.5 | vulnerable |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4ubuntu0.16.04.6 | vulnerable |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4ubuntu0.16.04.7 | vulnerable |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4ubuntu0.16.04.8 | vulnerable |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4ubuntu0.16.04.10 | vulnerable |
| Ubuntu | libgd2 | 16.04 | 2.1.1-4ubuntu0.16.04.11 | fixed |
| Ubuntu | libgd2 | 18.04 | 2.2.5-3 | vulnerable |
| Ubuntu | libgd2 | 18.04 | 2.2.5-4 | vulnerable |
| Ubuntu | libgd2 | 18.04 | 2.2.5-4ubuntu0.2 | vulnerable |
| Ubuntu | libgd2 | 18.04 | 2.2.5-4ubuntu0.3 | fixed |
| Suse | php53 | linux enterprise software development kit 11 sp4 | 5.3.17-112.53.1 | fixed |
| Suse | php53 | linux enterprise server 11 sp4 | 5.3.17-112.53.1 | fixed |
| Suse | php53 | linux enterprise server for sap applications 11 sp4 | 5.3.17-112.53.1 | fixed |
| Suse | gd | linux enterprise module for basesystem 15 | 2.2.5-4.6.1 | fixed |
| Suse | gd | linux enterprise module for desktop applications 15 | 2.2.5-4.6.1 | fixed |
| Suse | gd | linux enterprise desktop 12 sp3 | 2.1.0-24.12.1 | fixed |
| Suse | gd | linux enterprise desktop 12 sp4 | 2.1.0-24.12.1 | fixed |
| Suse | gd | linux enterprise software development kit 12 sp3 | 2.1.0-24.12.1 | fixed |
| Suse | gd | linux enterprise software development kit 12 sp4 | 2.1.0-24.12.1 | fixed |
| Suse | gd | linux enterprise server 12 sp3 | 2.1.0-24.12.1 | fixed |
| Suse | gd | linux enterprise server for sap applications 12 sp3 | 2.1.0-24.12.1 | fixed |
| Suse | gd | linux enterprise server 12 sp4 | 2.1.0-24.12.1 | fixed |
| Suse | gd | linux enterprise server for sap applications 12 sp4 | 2.1.0-24.12.1 | fixed |
| Suse | gd | linux enterprise workstation extension 12 sp3 | 2.1.0-24.12.1 | fixed |
| Suse | gd | linux enterprise workstation extension 12 sp4 | 2.1.0-24.12.1 | fixed |
| Opensuse | perl-GD | tumbleweed | 2.76-1.1 | fixed |
| Opensuse | gd | leap 15.0 | 2.2.5-lp150.8.1 | fixed |
| Suse | php5 | linux enterprise module for web and scripting 12 | 5.5.14-109.48.1 | fixed |
| Suse | php5 | linux enterprise software development kit 12 sp3 | 5.5.14-109.48.1 | fixed |
| Suse | php5 | linux enterprise software development kit 12 sp4 | 5.5.14-109.48.1 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | libgd2 | source | sid | 2.2.5-5.1 | not yet assigned | Not reported | [920645] |
| Debian | libgd2 | source | forky | 2.2.5-5.1 | not yet assigned | Not reported | [920645] |
| Debian | libgd2 | source | trixie | 2.2.5-5.1 | not yet assigned | Not reported | [920645] |
| Debian | libgd2 | source | bookworm | 2.2.5-5.1 | not yet assigned | Not reported | [920645] |
| Alpine | gd | apk | 3.10 | 2.2.5-r2 | Not reported | ALPINE-CVE-2019-6977 | Not reported |
| Alpine | gd | apk | 3.11 | 2.2.5-r2 | Not reported | ALPINE-CVE-2019-6977 | Not reported |
| Alpine | gd | apk | 3.12 | 2.2.5-r2 | Not reported | ALPINE-CVE-2019-6977 | Not reported |
| Alpine | gd | apk | 3.13 | 2.2.5-r2 | Not reported | ALPINE-CVE-2019-6977 | Not reported |
| Alpine | gd | apk | 3.14 | 2.2.5-r2 | Not reported | ALPINE-CVE-2019-6977 | Not reported |
| Alpine | gd | apk | 3.15 | 2.2.5-r2 | Not reported | ALPINE-CVE-2019-6977 | Not reported |
| Alpine | gd | apk | 3.16 | 2.2.5-r2 | Not reported | ALPINE-CVE-2019-6977 | Not reported |
| Alpine | gd | apk | 3.17 | 2.2.5-r2 | Not reported | ALPINE-CVE-2019-6977 | Not reported |
| Alpine | gd | apk | 3.18 | 2.2.5-r2 | Not reported | ALPINE-CVE-2019-6977 | Not reported |
| Alpine | gd | apk | 3.19 | 2.2.5-r2 | Not reported | ALPINE-CVE-2019-6977 | Not reported |
| Alpine | gd | apk | 3.20 | 2.2.5-r2 | Not reported | ALPINE-CVE-2019-6977 | Not reported |
| Alpine | gd | apk | 3.21 | 2.2.5-r2 | Not reported | ALPINE-CVE-2019-6977 | Not reported |
| Alpine | gd | apk | 3.22 | 2.2.5-r2 | Not reported | ALPINE-CVE-2019-6977 | Not reported |
| Alpine | gd | apk | 3.23 | 2.2.5-r2 | Not reported | ALPINE-CVE-2019-6977 | Not reported |
| Alpine | gd | apk | 3.24 | 2.2.5-r2 | Not reported | ALPINE-CVE-2019-6977 | Not reported |
| Alpine | gd | apk | 3.6 | 2.2.5-r2 | Not reported | ALPINE-CVE-2019-6977 | Not reported |
| Alpine | gd | apk | 3.7 | 2.2.5-r2 | Not reported | ALPINE-CVE-2019-6977 | Not reported |
| Alpine | gd | apk | 3.8 | 2.2.5-r2 | Not reported | ALPINE-CVE-2019-6977 | Not reported |
| Alpine | gd | apk | 3.9 | 2.2.5-r2 | Not reported | ALPINE-CVE-2019-6977 | Not reported |
| Ubuntu | libgd2 | deb | 14.04 | 2.1.0-3ubuntu0.11 | Not reported | UBUNTU-CVE-2019-6977 | Not reported |
| Ubuntu | libgd2 | deb | 16.04 | 2.1.1-4ubuntu0.16.04.11 | Not reported | UBUNTU-CVE-2019-6977 | Not reported |
| Ubuntu | libgd2 | deb | 18.04 | 2.2.5-4ubuntu0.3 | Not reported | UBUNTU-CVE-2019-6977 | Not reported |
| Ubuntu | libgd2 | deb | 14.04 | 2.1.0-3ubuntu0.11 | Not reported | USN-3900-1 | Not reported |
| Ubuntu | libgd2 | deb | 16.04 | 2.1.1-4ubuntu0.16.04.11 | Not reported | USN-3900-1 | Not reported |
| Ubuntu | libgd2 | deb | 18.04 | 2.2.5-4ubuntu0.3 | Not reported | USN-3900-1 | Not reported |
| Suse | php53 | rpm | linux enterprise software development kit 11 sp4 | 5.3.17-112.53.1 | Not reported | SUSE-SU-2019:13961-1 | Not reported |
| Suse | php53 | rpm | linux enterprise server 11 sp4 | 5.3.17-112.53.1 | Not reported | SUSE-SU-2019:13961-1 | Not reported |
| Suse | php53 | rpm | linux enterprise server for sap applications 11 sp4 | 5.3.17-112.53.1 | Not reported | SUSE-SU-2019:13961-1 | Not reported |
| Suse | gd | rpm | linux enterprise module for basesystem 15 | 2.2.5-4.6.1 | Not reported | SUSE-SU-2019:0771-1 | Not reported |
| Suse | gd | rpm | linux enterprise module for desktop applications 15 | 2.2.5-4.6.1 | Not reported | SUSE-SU-2019:0771-1 | Not reported |
| Suse | gd | rpm | linux enterprise desktop 12 sp3 | 2.1.0-24.12.1 | Not reported | SUSE-SU-2019:0747-1 | Not reported |
| Suse | gd | rpm | linux enterprise desktop 12 sp4 | 2.1.0-24.12.1 | Not reported | SUSE-SU-2019:0747-1 | Not reported |
| Suse | gd | rpm | linux enterprise software development kit 12 sp3 | 2.1.0-24.12.1 | Not reported | SUSE-SU-2019:0747-1 | Not reported |
| Suse | gd | rpm | linux enterprise software development kit 12 sp4 | 2.1.0-24.12.1 | Not reported | SUSE-SU-2019:0747-1 | Not reported |
| Suse | gd | rpm | linux enterprise server 12 sp3 | 2.1.0-24.12.1 | Not reported | SUSE-SU-2019:0747-1 | Not reported |
| Suse | gd | rpm | linux enterprise server for sap applications 12 sp3 | 2.1.0-24.12.1 | Not reported | SUSE-SU-2019:0747-1 | Not reported |
| Suse | gd | rpm | linux enterprise server 12 sp4 | 2.1.0-24.12.1 | Not reported | SUSE-SU-2019:0747-1 | Not reported |
| Suse | gd | rpm | linux enterprise server for sap applications 12 sp4 | 2.1.0-24.12.1 | Not reported | SUSE-SU-2019:0747-1 | Not reported |
| Suse | gd | rpm | linux enterprise workstation extension 12 sp3 | 2.1.0-24.12.1 | Not reported | SUSE-SU-2019:0747-1 | Not reported |
| Suse | gd | rpm | linux enterprise workstation extension 12 sp4 | 2.1.0-24.12.1 | Not reported | SUSE-SU-2019:0747-1 | Not reported |
| Opensuse | perl-GD | rpm | tumbleweed | 2.76-1.1 | Not reported | OPENSUSE-SU-2024:11852-1 | Not reported |
| Opensuse | gd | rpm | leap 15.0 | 2.2.5-lp150.8.1 | Not reported | OPENSUSE-SU-2019:1148-1 | Not reported |
| Suse | php5 | rpm | linux enterprise module for web and scripting 12 | 5.5.14-109.48.1 | Not reported | SUSE-SU-2019:0449-1 | Not reported |
| Suse | php5 | rpm | linux enterprise software development kit 12 sp3 | 5.5.14-109.48.1 | Not reported | SUSE-SU-2019:0449-1 | Not reported |
| Suse | php5 | rpm | linux enterprise software development kit 12 sp4 | 5.5.14-109.48.1 | Not reported | SUSE-SU-2019:0449-1 | Not reported |
OpenFactory catalog packages
Matching against OpenFactory catalog package versions is in progress.
[Debian 12 (Bookworm)]
- [libgd3]Unknown
Source package: [libgd2]
Details (4)
2.3.3-9· amd64 · bookwormFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12
2.3.3-9· arm64 · bookwormFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12
2.3.3-9+deb12u1· amd64 · bookworm-securityFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12
2.3.3-9+deb12u1· arm64 · bookworm-securityFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12
- [libgd-dev]Unknown
Source package: [libgd2]
Details (4)
2.3.3-9· amd64 · bookwormFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12
2.3.3-9· arm64 · bookwormFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12
2.3.3-9+deb12u1· amd64 · bookworm-securityFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12
2.3.3-9+deb12u1· arm64 · bookworm-securityFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12
- [libgd-tools]Unknown
Source package: [libgd2]
Details (4)
2.3.3-9· amd64 · bookwormFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12
2.3.3-9· arm64 · bookwormFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12
2.3.3-9+deb12u1· amd64 · bookworm-securityFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12
2.3.3-9+deb12u1· arm64 · bookworm-securityFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12
[Debian 13 (Trixie)]
- [libgd3]Unknown
Source package: [libgd2]
Details (4)
2.3.3-13· amd64 · trixieFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · 13
2.3.3-13· arm64 · trixieFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · 13
2.3.3-14~deb13u1· amd64 · trixie-securityFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · 13
2.3.3-14~deb13u1· arm64 · trixie-securityFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · 13
- [libgd-dev]Unknown
Source package: [libgd2]
Details (4)
2.3.3-13· amd64 · trixieFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · 13
2.3.3-13· arm64 · trixieFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · 13
2.3.3-14~deb13u1· amd64 · trixie-securityFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · 13
2.3.3-14~deb13u1· arm64 · trixie-securityFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · 13
- [libgd-tools]Unknown
Source package: [libgd2]
Details (4)
2.3.3-13· amd64 · trixieFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · 13
2.3.3-13· arm64 · trixieFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · 13
2.3.3-14~deb13u1· amd64 · trixie-securityFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · 13
2.3.3-14~deb13u1· arm64 · trixie-securityFixed · Fixed:
2.2.5-5.1dsa · libgd2 · debian · 13
[openSUSE Tumbleweed]
Observed:
References
- [https://ftp.suse.com/pub/projects/security/csaf/rhsa-2020_4659.json]
- [https://osv.dev/vulnerability/ALPINE-CVE-2019-6977]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2019-6977]
- [https://osv.dev/vulnerability/DLA-1679-1]
- [https://osv.dev/vulnerability/DSA-4384-1]
- [https://osv.dev/vulnerability/SUSE-SU-2019:0449-1]
- [https://osv.dev/vulnerability/SUSE-SU-2019:0747-1]
- [https://osv.dev/vulnerability/SUSE-SU-2019:0771-1]
- [https://osv.dev/vulnerability/SUSE-SU-2019:13961-1]
- [https://osv.dev/vulnerability/UBUNTU-CVE-2019-6977]
- [https://osv.dev/vulnerability/USN-3900-1]
- [https://osv.dev/vulnerability/openSUSE-SU-2019:1148-1]
- [https://osv.dev/vulnerability/openSUSE-SU-2024:11852-1]
- [https://security-tracker.debian.org/tracker/CVE-2019-6977]
- [https://security.access.redhat.com/data/csaf/v2/vex/2019/cve-2019-6977.json]
[Debian Security Tracker] · [FIRST EPSS] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX] · [SUSE security advisories and VEX]