CVE-2021-40145: Libgd

High severity, CVSS 7.5. EPSS: 2.1% probability of exploitation activity in the next 30 days.

gdImageGd2Ptr in gd_gd2.c in the GD Graphics Library (aka LibGD) through 2.3.2 has a double free. NOTE: the vendor's position is "The GD2 image format is a proprietary image format of libgd. It has to be regarded as being obsolete, and should only be used for development and testing purposes.

What to do

No fixed version is stated in NVD's or the CNA's structured data. Check the vendor's advisory among the references.

Affected products

Published 2021-08-26. Last modified 2026-06-17.