CVE-2019-6977Libgd
High 8.8 No auth neededHigh EPSS
Follow: this CVE · Libgd · Libgd We alert you by email or Slack (account required).
- Priority
- 75
- CVSS 3.0
- 8.8
- EPSS
- 71.5% probability of exploitation in 30 days · percentile 100
- Auth required
- No
- Published
- Jan 27, 2019
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-787
- Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for Libgd.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| libgd | libgd | 2.2.5 |
| php | php | < 5.6.40 |
| php | php | ≥ 7.0.0 < 7.1.26 |
| php | php | ≥ 7.2.0 < 7.2.14 |
| php | php | 7.3.0 |
| debian | debian_linux | 8.0 |
| debian | debian_linux | 9.0 |
| canonical | ubuntu_linux | 14.04 |
| canonical | ubuntu_linux | 16.04 |
| canonical | ubuntu_linux | 18.04 |
| canonical | ubuntu_linux | 18.10 |
| netapp | storage_automation_store | all |
Official sources
References
Links published by the sources. Open them with care.
- lists.opensuse.org
- lists.opensuse.org
- packetstormsecurity.com
- php.net Release Notes Vendor Advisory
- php.net Release Notes Vendor Advisory
- www.securityfocus.com Third Party Advisory VDB Entry
- access.redhat.com
- access.redhat.com
- bugs.php.net Exploit Issue Tracking Mailing List
- lists.debian.org Mailing List Third Party Advisory
- lists.fedoraproject.org
- lists.fedoraproject.org
- lists.fedoraproject.org
- lists.fedoraproject.org
- security.gentoo.org Third Party Advisory
- security.netapp.com Patch Third Party Advisory
- usn.ubuntu.com Third Party Advisory
- www.debian.org Third Party Advisory
- www.exploit-db.com