LiveActive security incident?Get immediate response
CVE Record

CVE-2021-40812: The GD Graphics Library (aka LibGD) through 2.3.2 has an out-of-bounds read because of the lack of certain...

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.

MediumCVSS 6.5Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

LibGD image library through 2.3.2 can read outside expected memory bounds when buffer operations fail and return values are not checked. Business impact is mainly service disruption in software that processes images through LibGD; the CVSS vector rates availability impact as high.

Executive priority

Schedule remediation in normal vulnerability patch cycles, with faster handling for Internet-facing image upload, conversion, or thumbnailing services. The main business risk is avoidable outage, not data theft, based on the supplied CVSS and references.

Technical view

CVE-2021-40812 is a CWE-125 out-of-bounds read in GD Graphics Library caused by missing gdGetBuf and gdPutBuf return-value checks. The CVSS 3.1 vector is AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H, indicating low-complexity network reachability with user interaction and availability-only impact.

Likely exposure

Exposure is most likely where applications, web services, or batch jobs use LibGD/libgd2 to parse or transform image content, especially content supplied by users or external systems. The bundle names LibGD through 2.3.2 and Debian's libgd2 update.

Exploitation context

The source bundle does not show CISA KEV listing or cited evidence of active exploitation. The CVSS vector requires user interaction and does not indicate confidentiality or integrity impact. Treat it as a denial-of-service risk until vendor-specific evidence says otherwise.

Researcher notes

Evidence is limited to the CVE record, upstream issue/commit references, and a Debian LTS advisory. The affected range is described as LibGD through 2.3.2, but the bundle does not provide a universal fixed release number across all packaging ecosystems.

Mitigation direction

  • Inventory systems and containers for LibGD or libgd2 versions through 2.3.2.
  • Apply vendor or distribution security updates that address CVE-2021-40812.
  • For source builds, review the upstream fixing commit and vendor guidance before rebuilding.
  • Prioritize services that process externally supplied images.
  • Reduce exposure of image-processing paths until patched, where operationally feasible.

Validation and detection

  • Confirm package metadata or SBOM entries no longer show vulnerable LibGD versions.
  • Verify vendor changelogs mention CVE-2021-40812 or the referenced LibGD fix.
  • Check image-processing services for recent crash or availability incidents.
  • Confirm externally reachable upload or conversion paths run on patched hosts.
  • Document any remaining embedded or statically linked LibGD copies.
Prepared
Confidence
medium
Sources
5

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-125: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-40812 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
6.5 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
4Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
6.5CVSS 3.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H2.83.6Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

6.5Medium
CVSS 3.1 vector shape for CVE-2021-40812Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
n/an/an/aListed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-125 · source CWE mapping

Out-of-bounds Read

Out-of-bounds Read represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.