CVE-2021-40145
published 2021-08-26CVE-2021-40145: 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…
PriorityP336high7.5CVSS 3.1
AVNACLPRNUINSUCNINAH
EPSS
2.05%
78.8th percentile
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
4 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | libgd2 | < libgd2 2.3.3-1 (bookworm) | libgd2 2.3.3-1 (bookworm) |
| libgd | libgd | <= 2.3.2 | — |
| msrc | cbl2_gd_2.3.0-5_on_cbl_mariner_2.0 | — | — |
| msrc | cm1_gd_2.3.3-1_on_cbl_mariner_1.0 | — | — |
CVSS provenance
nvdv3.17.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
nvdv2.05.0MEDIUMAV:N/AC:L/Au:N/C:N/I:N/A:P
osv8.1HIGH
vendor_ubuntu8.1HIGH
vendor_debian7.5LOW
vendor_msrc7.5HIGH
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Ubuntu
GD library vulnerabilities
vendor_ubuntu·2021-09-08·CVSS 8.1
CVE-2021-40145 [HIGH] GD library vulnerabilities
Title: GD library vulnerabilities
Summary: Several security issues were fixed in GD library.
It was discovered that GD Graphics Library incorrectly handled certain GD and GD2 files.
An attacker could possibly use this issue to cause a crash or expose sensitive information.
This issue only affected Ubuntu 20.04 LTS, Ubuntu 18.04 LTS, Ubuntu 16.04 ESM, and Ubuntu 14.04 ESM.
(CVE-2017-6363)
It was discovered that GD Graphics Library incorrectly handled certain TGA files.
An attacker could possibly use this issue to cause a denial of service or
expose sensitive information. (CVE-2021-381)
It was discovered that GD Graphics Library incorrectly handled certain files.
An attacker could possibly use this issue to cause a crash.
(CVE-2021-40145)
Instructions: In general, a standard system upda
Microsoft
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
vendor_msrc·2021-08-10·CVSS 7.5
CVE-2021-40145 [HIGH] CWE-415 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
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.
FAQ: Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog p
Debian
CVE-2021-40145: libgd2 - gdImageGd2Ptr in gd_gd2.c in the GD Graphics Library (aka LibGD) through 2.3.2 h...
vendor_debian·2021·CVSS 7.5
CVE-2021-40145 [HIGH] CVE-2021-40145: libgd2 - gdImageGd2Ptr in gd_gd2.c in the GD Graphics Library (aka LibGD) through 2.3.2 h...
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.
Scope: local
bookworm: resolved (fixed in 2.3.3-1)
bullseye: resolved (fixed in 2.3.0-2+deb11u1)
forky: resolved (fixed in 2.3.3-1)
sid: resolved (fixed in 2.3.3-1)
trixie: resolved (fixed in 2.3.3-1)
GHSA
GHSA-8rm3-jg2c-hvfh: ** DISPUTED ** gdImageGd2Ptr in gd_gd2
ghsa_unreviewed·2022-05-24
CVE-2021-40145 [HIGH] CWE-415 GHSA-8rm3-jg2c-hvfh: ** DISPUTED ** gdImageGd2Ptr in gd_gd2
** DISPUTED ** 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."
OSV
libgd2 vulnerabilities
osv·2021-09-08·CVSS 8.1
CVE-2017-6363 [HIGH] libgd2 vulnerabilities
libgd2 vulnerabilities
It was discovered that GD Graphics Library incorrectly handled certain GD and GD2 files.
An attacker could possibly use this issue to cause a crash or expose sensitive information.
This issue only affected Ubuntu 20.04 LTS, Ubuntu 18.04 LTS, Ubuntu 16.04 ESM, and Ubuntu 14.04 ESM.
(CVE-2017-6363)
It was discovered that GD Graphics Library incorrectly handled certain TGA files.
An attacker could possibly use this issue to cause a denial of service or
expose sensitive information. (CVE-2021-381)
It was discovered that GD Graphics Library incorrectly handled certain files.
An attacker could possibly use this issue to cause a crash.
(CVE-2021-40145)
OSV
CVE-2021-40145: gdImageGd2Ptr in gd_gd2
osv·2021-08-26·CVSS 7.5
CVE-2021-40145 [HIGH] CVE-2021-40145: gdImageGd2Ptr in gd_gd2
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.
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/libgd/libgd/commit/c5fd25ce0e48fd5618a972ca9f5e28d6d62006afhttps://github.com/libgd/libgd/issues/700https://github.com/libgd/libgd/pull/713https://github.com/libgd/libgd/commit/c5fd25ce0e48fd5618a972ca9f5e28d6d62006afhttps://github.com/libgd/libgd/issues/700https://github.com/libgd/libgd/pull/713
2021-08-26
Published