CVE-2019-6977: Canonical Ubuntu Linux

High severity, CVSS 8.8. EPSS: 71% probability of exploitation activity 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.

What to do

The record states a fixed version for each range of affected versions. Update to the one for the range your version is in: a later release on another branch may not have the fix.

  • PHP, before 5.6.40: fixed in 5.6.40
  • PHP, from 7.0.0, before 7.1.26: fixed in 7.1.26
  • PHP, from 7.2.0, before 7.2.14: fixed in 7.2.14

Affected products

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