🛡️ CVE-2021-40812 on Ubuntu — libgd2
Description
The GD Graphics Library (aka LibGD) through 2.3.2 has an out-of-bounds read because of the lack of certain gdGetBuf and gdPutBuf return value checks.
Distribution advisory
This page covers CVE-2021-40812 as tracked by Ubuntu, for the package libgd2. The fix is available in version 2.3.0-2ubuntu2.3; earlier versions remain affected.
How this vulnerability can be exploited
This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. A user must be tricked into taking some action. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity none, availability high.
Affected software
UBUNTU-CVE-2021-40812 is recorded against 1 package.
- libgd2 (fixed in 2.3.0-2ubuntu2.3)
Timeline and source
Published on 8 September 2021 and last revised on 22 April 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.
References
ubuntu.com (Report)
github.com (Report)
www.cve.org (Report)
ubuntu.com (Advisory)
CVE-2021-40812 on other distributions
Each distribution ships its own build and its own fixed version. Pick the one you run:
Details
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| libgd2 | — | 2.3.0-2ubuntu2.3 |
References
Similar Threats
- Unknown DEBIAN-CVE-2026-9672
- Unknown ECHO-e17f-24a1-917b
- Unknown UBUNTU-CVE-2026-9672
- Unknown DLA-4411-1
- Unknown USN-7112-1
Free Vulnerability Check
Is your site affected by UBUNTU-CVE-2021-40812?
BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against UBUNTU-CVE-2021-40812 and other known CVE records.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.