CVE-2021-40145Libgd
High 7.5 No auth needed
Follow: this CVE · Libgd · Libgd We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.1
- 7.5
- EPSS
- 2.1% probability of exploitation in 30 days · percentile 83
- Auth required
- No
- Published
- Aug 26, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-415
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
What happens
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.
What to do
- Apply the vendor's security update for Libgd.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| libgd | libgd | ≤ 2.3.2 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- github.com Exploit Issue Tracking Third Party Advisory
- github.com Issue Tracking Third Party Advisory