HOMEVULNERABILITIESCVE-2021-40145
HIGH

CVE-2021-40145

CWE-415Published: August 26, 2021· Updated: Jun 17, 2026

7.5
CVSS v3.1

Official 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.

NVD Source

Technical Analysis

CVE-2021-40145 can be exploited remotely over the network without requiring physical or adjacent access, significantly expanding the attack surface for threat actors.

The vulnerability requires no privileges and no user interaction, making it a prime target for automated exploitation campaigns and worm-like propagation.

A successful exploit results in availability disruption (denial of service), with a CVSS base score of 7.5.

CVSS v3.1 Vector Breakdown

Exploitability
Attack VectorNetwork
Attack ComplexityLow
Privileges Req.None
User InteractionNone
ScopeUnchanged
Impact
ConfidentialityNone
IntegrityNone
AvailabilityHigh
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected Vendors & Products

libgd1 product(s)
libgd
Source: NVD CPE · 1 total CPE entries

Exploit & PoC Resources

NO KNOWN EXPLOITNo public exploit confirmed at this time
External links open in a new tab. Always verify in a controlled environment before use.

Official Patches & Advisories

All References (6)

https://github.com/libgd/libgd/issues/700Exploit · Issue Tracking · Third Party Advisory
https://github.com/libgd/libgd/pull/713Issue Tracking · Third Party Advisory
https://github.com/libgd/libgd/issues/700Exploit · Issue Tracking · Third Party Advisory
https://github.com/libgd/libgd/pull/713Issue Tracking · Third Party Advisory

Quick Facts

CVE IDCVE-2021-40145
CVSS Score7.5 / 10
SeverityHIGH
WeaknessCWE-415
CISA KEVNo
Affected1 vendor(s)
PublishedAug 26, 2021

Related CVEs (CWE-415)

Recommended Actions

  • Apply vendor patches immediately
  • Monitor CVE-2021-40145 in threat intel feeds
  • Review IDS/IPS signatures for exploitation attempts
Data sourced from NVD (NIST), CISA KEV, and EPSS (FIRST). Analysis generated by CTIWATCH.COM. CVE data is provided under the NVD usage policy.