7.5

CVE-2021-40145: libgd Double Free

Modified
AliasesALPINE-CVE-2021-40145UBUNTU-CVE-2021-40145DEBIAN-CVE-2021-40145
Published 26-08-2021Last modified 04-08-2024

Vulnerability summary

CVE-2021-40145 is a high (CVSS 7.5) Double Free vulnerability in libgd. EPSS estimates a 2.13% chance of exploitation in the next 30 days, higher than 82% of scored vulnerabilities. 1 public exploit is recorded.

Priority
Prioritisepublic exploit

Public exploit (GitHub, Date unknown)

Source freshness unavailable

How is this decided?
CVSS score
7.5/10
010
High · v3.1 (NVD)
EPSS score
2.13%
0%100%
Low · +0.08 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits1github

Advisory lineage

Upstream 0 · Downstream 3 · Related 1

Timeline

  1. 26-08-2021
    PublishedVulnerability first disclosed.
  2. 04-08-2024
    Last modifiedVulnerability information updated.

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 metrics

5 scores · 4 sources · 2 versions

EPSS trend

Probability

2.13%

Chance of exploitation in the next 30 days

Percentile

82%

Versus all other CVEs

30-day change

Increase +0.08 pp

From 2.05% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • githubUnverified

    Libgd

    Maturity: poc

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.

Alpine1 product
  • gd< 2.2.5-r4 | < 2.3.0-r1
Debian1 product
  • libgd2< 2.3.3-1
Libgd1 product
Ubuntu1 product
  • libgd2< 2.1.0-3ubuntu0.11+esm2 | < 2.1.1-4ubuntu0.16.04.12+esm1 | < 2.2.5-4ubuntu0.5 | < 2.2.5-5.2ubuntu2.1 | < 2.3.0-2ubuntu1

4 vendors · 4 products

References

9 links