CVE-2021-40145

Public Exploit

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.

Category

7.5
CVSS
Severity: High
CVSS 3.1 •
CVSS 2.0 •
EPSS 0.46%
Third-Party Advisory github.com Third-Party Advisory github.com Third-Party Advisory github.com
Affected: n/a n/a
Published at:
Updated at:

References

Link Tags
https://github.com/libgd/libgd/commit/c5fd25ce0e48fd5618a972ca9f5e28d6d62006af third party advisory patch
https://github.com/libgd/libgd/pull/713 third party advisory issue tracking
https://github.com/libgd/libgd/issues/700 third party advisory issue tracking exploit

Frequently Asked Questions

What is the severity of CVE-2021-40145?
CVE-2021-40145 has been scored as a high severity vulnerability.
How to fix CVE-2021-40145?
To fix CVE-2021-40145, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2021-40145 being actively exploited in the wild?
It is possible that CVE-2021-40145 is being exploited or will be exploited in a near future based on public information. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.