Skip to content
Fencer Intel
medium 6.5

CVE-2021-40812 json

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 val…

published 5y ago modified 3mo ago also EUVD-2021-27976 , JLSEC-2026-361

cvss
6.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.7%
EPSS 1.7% chance of exploitation in 30 days, percentile 76%
public exploits
0
none known

Summary

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.

Patch / fix

  • julia LibGD_jll 2.3.3+0
  • libgd2 Debian 14, Debian 13, Debian 12 2.3.3-1

debian advisories DEBIAN-CVE-2021-40812

  • libgd2 Ubuntu 20.04 LTS 2.2.5-5.2ubuntu2.4
  • libgd2 Ubuntu 22.04 LTS 2.3.0-2ubuntu2.3
  • libgd2 Ubuntu Pro 16.04 LTS 2.1.1-4ubuntu0.16.04.12+esm4
  • libgd2 Ubuntu Pro 18.04 LTS 2.2.5-4ubuntu0.5+esm3

ubuntu advisories UBUNTU-CVE-2021-40812

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • gd SLE Module for Package Hub 15 SP3, SLE Module for Package Hub 15 SP2, SLE Module for Desktop Applications 15 SP3 +3 more 2.2.5-11.3.1
  • gd SLES for SAP 12 SP5, SLES 12 SP5, SLE Workstation Extension 12 SP5 +1 more 2.1.0-24.20.1

suse advisories SUSE-SU-2021:3236-1SUSE-SU-2021:3214-1

  • gd openSUSE Leap 15.3 2.2.5-11.3.1

opensuse advisories openSUSE-SU-2021:3236-1

  • gd CBL-Mariner 2.0 2.3.3-1

azure linux advisories AZL-6433

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

  • gd Arch Linux 2.3.3-1

arch linux advisories AVG-2258

Is CVE-2021-40812 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
2y ago

Exploit prediction

1.66% chance of exploitation in the next 30 days, higher than 76% of all scored CVEs (FIRST EPSS, 2026-11-09).

CVSS scores

assigned by version score vector
CISA ADP 3.1 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NVD 3.1 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
CNA 3.1 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NVD 2.0 4.3 AV:N/AC:M/Au:N/C:N/I:N/A:P
OSV 3.1 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Affected packages

ecosystem package affected fixed in
julia LibGD_jll
<2.3.3+0
2.3.3+0

Classification

Weakness

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.