CVE-2019-6977: Canonical Ubuntu Linux

High severity, CVSS 8.8. EPSS: 71.5% chance of exploitation in the next 30 days.

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.

Affected products

  • Canonical Ubuntu Linux: version 14.04 only; version 16.04 only; version 18.04 only; version 18.10 only
  • Debian Debian Linux: version 8.0 only; version 9.0 only
  • Libgd Libgd: version 2.2.5 only
  • Netapp Storage Automation Store: any version
  • PHP PHP: before 5.6.40 (fixed in 5.6.40); from 7.0.0, before 7.1.26 (fixed in 7.1.26); from 7.2.0, before 7.2.14 (fixed in 7.2.14); version 7.3.0 only

Published 2019-01-27. Last modified 2026-06-17.