CVE catalog

CVE-2021-40812

libgd2: CVE-2021-40812

[CVE catalog]

Severity
Medium · CVSS 4CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Published
Source
[NVD] · [CVE record]
EPSS
1.66% · Oct 27, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debianlibgd2sid2.3.3-14fixed
Debianlibgd2forky2.3.3-14fixed
Debianlibgd2trixie2.3.3-14~deb13u1fixed
Debianlibgd2trixie-security2.3.3-14~deb13u1fixed
Debianlibgd2bookworm2.3.3-9fixed
Debianlibgd2bookworm-security2.3.3-9+deb12u1fixed
Ubuntulibgd2pro2.2.5-3vulnerable
Ubuntulibgd2pro2.2.5-4vulnerable
Ubuntulibgd2pro2.2.5-4ubuntu0.2vulnerable
Ubuntulibgd2pro2.2.5-4ubuntu0.3vulnerable
Ubuntulibgd2pro2.2.5-4ubuntu0.4vulnerable
Ubuntulibgd2pro2.2.5-4ubuntu0.5vulnerable
Ubuntulibgd2pro2.2.5-4ubuntu0.5+esm3fixed
Ubuntulibgd220.042.2.5-5.2vulnerable
Ubuntulibgd220.042.2.5-5.2ubuntu2vulnerable
Ubuntulibgd220.042.2.5-5.2ubuntu2.1vulnerable
Ubuntulibgd220.042.2.5-5.2ubuntu2.4fixed
Ubuntulibgd222.042.3.0-2ubuntu1vulnerable
Ubuntulibgd222.042.3.0-2ubuntu2vulnerable
Ubuntulibgd222.042.3.0-2ubuntu2.3fixed
Ubuntulibgd2pro2.2.5-3vulnerable
Ubuntulibgd2pro2.2.5-4vulnerable
Ubuntulibgd2pro2.2.5-4ubuntu0.2vulnerable
Ubuntulibgd2pro2.2.5-4ubuntu0.3vulnerable
Ubuntulibgd2pro2.2.5-4ubuntu0.4vulnerable
Ubuntulibgd2pro2.2.5-4ubuntu0.5vulnerable
Ubuntulibgd2pro2.2.5-4ubuntu0.5+esm3fixed
Ubuntulibgd220.042.2.5-5.2vulnerable
Ubuntulibgd220.042.2.5-5.2ubuntu2vulnerable
Ubuntulibgd220.042.2.5-5.2ubuntu2.1vulnerable
Ubuntulibgd220.042.2.5-5.2ubuntu2.4fixed
Ubuntulibgd222.042.3.0-2ubuntu1vulnerable
Ubuntulibgd222.042.3.0-2ubuntu2vulnerable
Ubuntulibgd222.042.3.0-2ubuntu2.3fixed
Opensusegdleap 15.32.2.5-11.3.1fixed
Susegdlinux enterprise software development kit 12 sp52.1.0-24.20.1fixed
Susegdlinux enterprise server 12 sp52.1.0-24.20.1fixed
Susegdlinux enterprise server for sap applications 12 sp52.1.0-24.20.1fixed
Susegdlinux enterprise workstation extension 12 sp52.1.0-24.20.1fixed
Susegdlinux enterprise module for basesystem 15 sp22.2.5-11.3.1fixed
Susegdlinux enterprise module for basesystem 15 sp32.2.5-11.3.1fixed
Susegdlinux enterprise module for desktop applications 15 sp22.2.5-11.3.1fixed
Susegdlinux enterprise module for desktop applications 15 sp32.2.5-11.3.1fixed
Susegdlinux enterprise module for package hub 15 sp22.2.5-11.3.1fixed
Susegdlinux enterprise module for package hub 15 sp32.2.5-11.3.1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianlibgd2sourcesid2.3.3-1not yet assignedNot reportedNot reported
Debianlibgd2sourceforky2.3.3-1not yet assignedNot reportedNot reported
Debianlibgd2sourcetrixie2.3.3-1not yet assignedNot reportedNot reported
Debianlibgd2sourcebookworm2.3.3-1not yet assignedNot reportedNot reported
Ubuntulibgd2debpro2.2.5-4ubuntu0.5+esm3Not reportedUSN-7112-1Not reported
Ubuntulibgd2deb20.042.2.5-5.2ubuntu2.4Not reportedUSN-7112-1Not reported
Ubuntulibgd2deb22.042.3.0-2ubuntu2.3Not reportedUSN-7112-1Not reported
Ubuntulibgd2debpro2.2.5-4ubuntu0.5+esm3Not reportedUBUNTU-CVE-2021-40812Not reported
Ubuntulibgd2deb20.042.2.5-5.2ubuntu2.4Not reportedUBUNTU-CVE-2021-40812Not reported
Ubuntulibgd2deb22.042.3.0-2ubuntu2.3Not reportedUBUNTU-CVE-2021-40812Not reported
Opensusegdrpmleap 15.32.2.5-11.3.1Not reportedOPENSUSE-SU-2021:3236-1Not reported
Susegdrpmlinux enterprise software development kit 12 sp52.1.0-24.20.1Not reportedSUSE-SU-2021:3214-1Not reported
Susegdrpmlinux enterprise server 12 sp52.1.0-24.20.1Not reportedSUSE-SU-2021:3214-1Not reported
Susegdrpmlinux enterprise server for sap applications 12 sp52.1.0-24.20.1Not reportedSUSE-SU-2021:3214-1Not reported
Susegdrpmlinux enterprise workstation extension 12 sp52.1.0-24.20.1Not reportedSUSE-SU-2021:3214-1Not reported
Susegdrpmlinux enterprise module for basesystem 15 sp22.2.5-11.3.1Not reportedSUSE-SU-2021:3236-1Not reported
Susegdrpmlinux enterprise module for basesystem 15 sp32.2.5-11.3.1Not reportedSUSE-SU-2021:3236-1Not reported
Susegdrpmlinux enterprise module for desktop applications 15 sp22.2.5-11.3.1Not reportedSUSE-SU-2021:3236-1Not reported
Susegdrpmlinux enterprise module for desktop applications 15 sp32.2.5-11.3.1Not reportedSUSE-SU-2021:3236-1Not reported
Susegdrpmlinux enterprise module for package hub 15 sp22.2.5-11.3.1Not reportedSUSE-SU-2021:3236-1Not reported
Susegdrpmlinux enterprise module for package hub 15 sp32.2.5-11.3.1Not reportedSUSE-SU-2021:3236-1Not reported

OpenFactory catalog packages

Matching against OpenFactory catalog package versions is in progress.

[Debian 12 (Bookworm)]

  • [libgd3]Unknown

    Source package: [libgd2]

    Details (4)
    • 2.3.3-9 · amd64 · bookworm

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12

    • 2.3.3-9 · arm64 · bookworm

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12

    • 2.3.3-9+deb12u1 · amd64 · bookworm-security

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12

    • 2.3.3-9+deb12u1 · arm64 · bookworm-security

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12

  • [libgd-dev]Unknown

    Source package: [libgd2]

    Details (4)
    • 2.3.3-9 · amd64 · bookworm

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12

    • 2.3.3-9 · arm64 · bookworm

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12

    • 2.3.3-9+deb12u1 · amd64 · bookworm-security

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12

    • 2.3.3-9+deb12u1 · arm64 · bookworm-security

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12

  • [libgd-tools]Unknown

    Source package: [libgd2]

    Details (4)
    • 2.3.3-9 · amd64 · bookworm

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12

    • 2.3.3-9 · arm64 · bookworm

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12

    • 2.3.3-9+deb12u1 · amd64 · bookworm-security

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12

    • 2.3.3-9+deb12u1 · arm64 · bookworm-security

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · bookworm; dsa · libgd2 · debian · 12

[Debian 13 (Trixie)]

  • [libgd3]Unknown

    Source package: [libgd2]

    Details (4)
    • 2.3.3-13 · amd64 · trixie

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · 13

    • 2.3.3-13 · arm64 · trixie

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · 13

    • 2.3.3-14~deb13u1 · amd64 · trixie-security

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · 13

    • 2.3.3-14~deb13u1 · arm64 · trixie-security

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · 13

  • [libgd-dev]Unknown

    Source package: [libgd2]

    Details (4)
    • 2.3.3-13 · amd64 · trixie

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · 13

    • 2.3.3-13 · arm64 · trixie

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · 13

    • 2.3.3-14~deb13u1 · amd64 · trixie-security

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · 13

    • 2.3.3-14~deb13u1 · arm64 · trixie-security

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · 13

  • [libgd-tools]Unknown

    Source package: [libgd2]

    Details (4)
    • 2.3.3-13 · amd64 · trixie

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · 13

    • 2.3.3-13 · arm64 · trixie

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · 13

    • 2.3.3-14~deb13u1 · amd64 · trixie-security

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · 13

    • 2.3.3-14~deb13u1 · arm64 · trixie-security

      Fixed · Fixed: 2.3.3-1

      dsa · libgd2 · debian · 13

Observed:

References