Vulnerability · Published Aug 26, 2021 · Assigned by mitre
CVE-2021-40145
High 7.5
In plain English
A high-severity security flaw in the gd package (Alpine). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.1% (higher than 82% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Severity (CVSS NVD)7.5High
Exploit odds (30 days)2.1%top 17.9% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | gd | 2.3.0-r1 | ALPINE-CVE-2021-40145 |
| Alpine:v3.21 | gd | 2.3.0-r1 | ALPINE-CVE-2021-40145 |
| Alpine:v3.22 | gd | 2.3.0-r1 | ALPINE-CVE-2021-40145 |
| Alpine:v3.23 | gd | 2.3.0-r1 | ALPINE-CVE-2021-40145 |
| Alpine:v3.24 | gd | 2.3.0-r1 | ALPINE-CVE-2021-40145 |
| Debian:12 | libgd2 | 2.3.3-1 | DEBIAN-CVE-2021-40145 |
| Debian:13 | libgd2 | 2.3.3-1 | DEBIAN-CVE-2021-40145 |
| Debian:14 | libgd2 | 2.3.3-1 | DEBIAN-CVE-2021-40145 |
| Ubuntu:22.04:LTS | libgd2 | 2.3.0-2ubuntu1 | UBUNTU-CVE-2021-40145 |
Affected products (as reported)
References
- https://github.com/libgd/libgd/commit/c5fd25ce0e48fd5618a972ca9f5e28d6d62006af x_refsource_MISC
- https://github.com/libgd/libgd/pull/713 x_refsource_MISC
- https://github.com/libgd/libgd/issues/700 x_refsource_MISC