Vulnerability record · CVE-2021-40145 · published 26 August 2021
CVE-2021-40145: Libgd double free vulnerability
Libgd · Libgd
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.
Description
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.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Affected products
1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.
References
| Link | Tags |
|---|---|
| https://github.com/libgd/libgd/commit/c5fd25ce0e48fd5618a972ca9f5e28d6d62006af | PatchThird Party Advisory |
| https://github.com/libgd/libgd/issues/700 | ExploitIssue TrackingThird Party Advisory |
| https://github.com/libgd/libgd/pull/713 | Issue TrackingThird Party Advisory |
| https://github.com/libgd/libgd/commit/c5fd25ce0e48fd5618a972ca9f5e28d6d62006af | PatchThird Party Advisory |
| https://github.com/libgd/libgd/issues/700 | ExploitIssue TrackingThird Party Advisory |
| https://github.com/libgd/libgd/pull/713 | Issue TrackingThird Party Advisory |
Track CVE-2021-40145 inside VULONE
Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.
Related vulnerabilities
Same products first, then exploited flaws of the same weakness class.
Source: NIST National Vulnerability Database (record CVE-2021-40145), CISA KEV, FIRST EPSS (scores of 2026-11-14). This page is refreshed as NVD updates the record.