Live threats

All CVEs / Libgd

CVE-2019-6977Libgd

High 8.8 No auth neededHigh EPSS

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Libgd.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected products (CPE)

VendorProductVersions
libgdlibgd2.2.5
phpphp< 5.6.40
phpphp≥ 7.0.0 < 7.1.26
phpphp≥ 7.2.0 < 7.2.14
phpphp7.3.0
debiandebian_linux8.0
debiandebian_linux9.0
canonicalubuntu_linux14.04
canonicalubuntu_linux16.04
canonicalubuntu_linux18.04
canonicalubuntu_linux18.10
netappstorage_automation_storeall

Official sources

References

Links published by the sources. Open them with care.