Every CVE Search/ Get API key

CVE-2021-40633

A memory leak (out-of-memory) in gif2rgb in util/gif2rgb.c in giflib 5.1.4 allows remote...

8.8 HighFix available

A memory leak (out-of-memory) in gif2rgb in util/gif2rgb.c in giflib 5.1.4 allows remote attackers trigger an out of memory exception or denial of service via a gif format file.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

1.72%Up 0.7 points since Jun 15, 2022
90%50%10%1%

What each source reports

NVD Score used 8.8

A memory leak (out-of-memory) in gif2rgb in util/gif2rgb.c in giflib 5.1.4 allows remote attackers trigger an out of memory exception or denial of service via a gif format file.

Record
CVE-2021-40633
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 2.0
5.1 MediumAV:N/AC:H/Au:N/C:P/I:P/A:P
Weakness
CWE-401
Updated
2026-11-02
CVE List No score

A memory leak (out-of-memory) in gif2rgb in util/gif2rgb.c in giflib 5.1.4 allows remote attackers trigger an out of memory exception or denial of service via a gif format file.

Record
CVE-2021-40633
Updated
2026-11-02
EUVDEUVD-2021-27807 No score

A memory leak (out-of-memory) in gif2rgb in util/gif2rgb.c in giflib 5.1.4 allows remote attackers trigger an out of memory exception or denial of service via a gif format file.

Record
EUVD-2021-27807
Updated
2026-11-03
GitHub AdvisoriesGHSA-77hm-q3fv-fq9x 8.8

A memory leak (out-of-memory) in gif2rgb in util/gif2rgb.c in giflib 5.1.4 allows remote...

A memory leak (out-of-memory) in gif2rgb in util/gif2rgb.c in giflib 5.1.4 allows remote attackers trigger an out of memory exception or denial of service via a gif format file.

Record
GHSA-77hm-q3fv-fq9x
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-401
Updated
2026-11-02
OSVALPINE-CVE-2021-40633 8.8

A memory leak (out-of-memory) in gif2rgb in util/gif2rgb.c in giflib 5.1.4 allows remote attackers trigger an out of memory exception or denial of service via a gif format file.

Record
ALPINE-CVE-2021-40633
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVAZL-41515 8.8

CVE-2021-40633 affecting package giflib for versions less than 5.2.1-10

A memory leak (out-of-memory) in gif2rgb in util/gif2rgb.c in giflib 5.1.4 allows remote attackers trigger an out of memory exception or denial of service via a gif format file.

Record
AZL-41515
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-05
Show 17 moreShow less
OSVBELL-CVE-2021-40633 8.8
Record
BELL-CVE-2021-40633
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSV 8.8

A memory leak (out-of-memory) in gif2rgb in util/gif2rgb.c in giflib 5.1.4 allows remote attackers trigger an out of memory exception or denial of service via a gif format file.

Record
CVE-2021-40633
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2021-40633 8.8

A memory leak (out-of-memory) in gif2rgb in util/gif2rgb.c in giflib 5.1.4 allows remote attackers trigger an out of memory exception or denial of service via a gif format file.

Record
DEBIAN-CVE-2021-40633
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVJLSEC-2026-816 8.8

A memory leak (out-of-memory) in gif2rgb in util/gif2rgb.c in giflib 5.1.4 allows remote attackers trigger an out of memory exception or denial of service via a gif format file.

Record
JLSEC-2026-816
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 2.0
5.1 MediumAV:N/AC:H/Au:N/C:P/I:P/A:P
Updated
2026-11-02
OSVOESA-2024-1595 8.8

giflib security update

giflib is a library of gif images and provides utilities for processing images.

Security Fix(es):

A memory leak (out-of-memory) in gif2rgb in util/gif2rgb.c in giflib 5.1.4 allows remote attackers trigger an out of memory exception or denial of service via a gif format file.(CVE-2021-40633)

Record
OESA-2024-1595
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVOESA-2024-1599 8.8

giflib security update

giflib is a library of gif images and provides utilities for processing images.

Security Fix(es):

A memory leak (out-of-memory) in gif2rgb in util/gif2rgb.c in giflib 5.1.4 allows remote attackers trigger an out of memory exception or denial of service via a gif format file.(CVE-2021-40633)

Record
OESA-2024-1599
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVOESA-2024-1602 8.8

giflib security update

giflib is a library of gif images and provides utilities for processing images.

Security Fix(es):

A memory leak (out-of-memory) in gif2rgb in util/gif2rgb.c in giflib 5.1.4 allows remote attackers trigger an out of memory exception or denial of service via a gif format file.(CVE-2021-40633)

Record
OESA-2024-1602
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVOESA-2024-1664 8.8

giflib security update

giflib is a library of gif images and provides utilities for processing images.

Security Fix(es):

A memory leak (out-of-memory) in gif2rgb in util/gif2rgb.c in giflib 5.1.4 allows remote attackers trigger an out of memory exception or denial of service via a gif format file.(CVE-2021-40633)

Record
OESA-2024-1664
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVOESA-2024-1665 8.8

giflib security update

giflib is a library of gif images and provides utilities for processing images.

Security Fix(es):

A memory leak (out-of-memory) in gif2rgb in util/gif2rgb.c in giflib 5.1.4 allows remote attackers trigger an out of memory exception or denial of service via a gif format file.(CVE-2021-40633)

Record
OESA-2024-1665
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVOESA-2024-1666 8.8

giflib security update

giflib is a library of gif images and provides utilities for processing images.

Security Fix(es):

A memory leak (out-of-memory) in gif2rgb in util/gif2rgb.c in giflib 5.1.4 allows remote attackers trigger an out of memory exception or denial of service via a gif format file.(CVE-2021-40633)

Record
OESA-2024-1666
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2021-40633 8.8

A memory leak (out-of-memory) in gif2rgb in util/gif2rgb.c in giflib 5.1.4 allows remote attackers trigger an out of memory exception or denial of service via a gif format file.

Record
UBUNTU-CVE-2021-40633
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVCLSA-2026-1787646995 No score

Fix CVE(s): CVE-2020-23922, CVE-2021-40633, CVE-2026-23868

  • SECURITY UPDATE: heap buffer over-read in gif2rgb
    • debian/patches/CVE-2020-23922.patch: bound each pixel index against the active color table before indexing ColorMap->Colors in DumpScreen2RGB in util/gif2rgb.c.
    • CVE-2020-23922
  • SECURITY UPDATE: memory leak leading to denial of service
    • debian/patches/CVE-2021-40633.patch: free every ScreenBuffer row, not just the row-pointer array, at the end of GIF2RGB in util/gif2rgb.c.
    • CVE-2021-40633
  • SECURITY UPDATE: double free in GifMakeSavedImage
    • debian/patches/CVE-2026-23868.patch: null out the heap pointers aliased by the shallow copy of CopyFrom, test the source record when deciding what to deep-copy, and restore ExtensionBlockCount after the extension blocks are copied, in lib/gifalloc.c.
    • CVE-2026-23868
Record
CLSA-2026-1787646995
Updated
2026-11-02
OSVopenSUSE-SU-2024:13723-1 No score

giflib-devel-32bit-5.2.2-1.1 on GA media

These are all security issues fixed in the giflib-devel-32bit-5.2.2-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:13723-1
Updated
2026-11-02
OSVROOT-OS-DEBIAN-12-CVE-2021-40633 No score

CVE-2021-40633 in giflib - Patched by Root

Root has patched CVE-2021-40633 in the giflib package for Root:Debian:12. Multiple fixed versions available.

Record
ROOT-OS-DEBIAN-12-CVE-2021-40633
Updated
2026-11-02
OSVSUSE-SU-2024:0786-1 No score

Security update for giflib

This update for giflib fixes the following issues:

Update to version 5.2.2

  • Fixes for CVE-2023-48161 (bsc#1217390), CVE-2022-28506 (bsc#1198880)
  • #138 Documentation for obsolete utilities still installed
  • #139: Typo in 'LZW image data' page ('110_2 = 4_10')
  • #140: Typo in 'LZW image data' page ('LWZ')
  • #141: Typo in 'Bits and bytes' page ('filed')
  • Note as already fixed SF issue #143: cannot compile under mingw
  • #144: giflib-5.2.1 cannot be build on windows and other platforms using c89
  • #145: Remove manual pages installation for binaries that are not installed too
  • #146: [PATCH] Limit installed man pages to binaries, move giflib to section 7
  • #147 [PATCH] Fixes to doc/whatsinagif/ content
  • #148: heap Out of Bound Read in gif2rgb.c:298 DumpScreen2RGB
  • Declared no-info on SF issue #150: There is a denial of service vulnerability in GIFLIB 5.2.1
  • Declared Won't-fix on SF issue 149: Out of source builds no longer possible
  • #151: A heap-buffer-overflow in gif2rgb.c:294:45
  • #152: Fix some typos on the html documentation and man pages
  • #153: Fix segmentation faults due to non correct checking for args
  • #154: Recover the giffilter manual page
  • #155: Add gifsponge docs
  • #157: An OutofMemory-Exception or Memory Leak in gif2rgb
  • #158: There is a null pointer problem in gif2rgb
  • #159 A heap-buffer-overflow in GIFLIB5.2.1 DumpScreen2RGB() in gif2rgb.c:298:45
  • #163: detected memory leaks in openbsd_reallocarray giflib/openbsd-reallocarray.c
  • #164: detected memory leaks in GifMakeMapObject giflib/gifalloc.c
  • #166: a read zero page leads segment fault in getarg.c and memory leaks in gif2rgb.c and gifmalloc.c
  • #167: Heap-Buffer Overflow during Image Saving in DumpScreen2RGB Function at Line 321 of gif2rgb.c
Record
SUSE-SU-2024:0786-1
Updated
2026-11-02
OSVSUSE-SU-2024:1622-1 No score

Security update for giflib

This update for giflib fixes the following issues:

  • CVE-2018-11490: Fixed a heap-based buffer overflow in DGifDecompressLine() (bsc#1094832)
  • CVE-2021-40633: Fixed a denial of service from excessive memory (bsc#1200551)
Record
SUSE-SU-2024:1622-1
Updated
2026-11-02
OSVUSN-6824-1 No score

giflib vulnerabilities

It was discovered that GIFLIB incorrectly handled certain GIF files. An attacker could possibly use this issue to cause a denial of service. (CVE-2021-40633, CVE-2022-28506, CVE-2023-39742)

Record
USN-6824-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
giflib
Alpine:v3.17
before 5.2.2-r0
5.2.2-r0
giflib
Alpine:v3.18
before 5.2.2-r0
5.2.2-r0
giflib
Alpine:v3.19
before 5.2.2-r0
5.2.2-r0
giflib
Alpine:v3.20
before 5.2.2-r0
5.2.2-r0
giflib
Alpine:v3.21
before 5.2.2-r0
5.2.2-r0
giflib
Alpine:v3.22
before 5.2.2-r0
5.2.2-r0
giflib
Alpine:v3.23
before 5.2.2-r0
5.2.2-r0
giflib
Alpine:v3.24
before 5.2.2-r0
5.2.2-r0
giflib
Azure Linux:3
before 5.2.1-10
5.2.1-10
giflib
Alpaquita:23
5.2.1-r2 up to 5.2.2-r0
5.2.2-r0
Show 39 moreShow less
Affected packages
PackageAffectedFixed
giflib
Alpaquita:stream
5.2.1-r5 up to 5.2.2-r0
5.2.2-r0
giflib-tools
TuxCare:Ubuntu:18.04
before 5.1.4-2ubuntu0.1+tuxcare.els1
5.1.4-2ubuntu0.1+tuxcare.els1
libgif-dev
TuxCare:Ubuntu:18.04
before 5.1.4-2ubuntu0.1+tuxcare.els1
5.1.4-2ubuntu0.1+tuxcare.els1
libgif7
TuxCare:Ubuntu:18.04
before 5.1.4-2ubuntu0.1+tuxcare.els1
5.1.4-2ubuntu0.1+tuxcare.els1
giflib
Debian:12
All versions, plus listed versions
5.2.1-2.55.2.1-2.5+deb12u15.2.2-16.1.3-1
None known
giflib
Debian:13
before 5.2.2-1
5.2.2-1
giflib
Debian:14
before 5.2.2-1
5.2.2-1
Giflib_jll
Julia
before 5.2.1+0
5.2.1+0
giflib
openEuler:20.03-LTS-SP1
before 5.2.1-5.oe1
5.2.1-5.oe1
giflib
openEuler:20.03-LTS-SP4
before 5.2.1-5.oe2003sp4
5.2.1-5.oe2003sp4
giflib
openEuler:22.03-LTS
before 5.2.1-6.oe2203
5.2.1-6.oe2203
giflib
openEuler:22.03-LTS-SP2
before 5.2.1-8.oe2203sp2
5.2.1-8.oe2203sp2
giflib
openEuler:22.03-LTS-SP3
before 5.2.1-8.oe2203sp3
5.2.1-8.oe2203sp3
giflib
openEuler:22.03-LTS-SP1
before 5.2.1-8.oe2203sp1
5.2.1-8.oe2203sp1
giflib
Root:Debian:12
before 5.2.1-2.5+deb12u1.aikido.8
5.2.1-2.5+deb12u1.aikido.8
rootio-giflib
Root:Debian:12
before 5.2.1-2.5+deb12u1.aikido.8
5.2.1-2.5+deb12u1.aikido.8
giflib
SUSE:Linux Enterprise Module for Basesystem 15 SP5
before 5.2.2-150000.4.13.1
5.2.2-150000.4.13.1
giflib
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS
before 5.2.2-150000.4.13.1
5.2.2-150000.4.13.1
giflib
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS
before 5.2.2-150000.4.13.1
5.2.2-150000.4.13.1
giflib
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS
before 5.2.2-150000.4.13.1
5.2.2-150000.4.13.1
giflib
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS
before 5.2.2-150000.4.13.1
5.2.2-150000.4.13.1
giflib
SUSE:Linux Enterprise Server 15 SP2-LTSS
before 5.2.2-150000.4.13.1
5.2.2-150000.4.13.1
giflib
SUSE:Linux Enterprise Server 15 SP3-LTSS
before 5.2.2-150000.4.13.1
5.2.2-150000.4.13.1
giflib
SUSE:Linux Enterprise Server 15 SP4-LTSS
before 5.2.2-150000.4.13.1
5.2.2-150000.4.13.1
giflib
SUSE:Linux Enterprise Server for SAP Applications 15 SP2
before 5.2.2-150000.4.13.1
5.2.2-150000.4.13.1
giflib
SUSE:Linux Enterprise Server for SAP Applications 15 SP3
before 5.2.2-150000.4.13.1
5.2.2-150000.4.13.1
giflib
SUSE:Linux Enterprise Server for SAP Applications 15 SP4
before 5.2.2-150000.4.13.1
5.2.2-150000.4.13.1
giflib
SUSE:Manager Proxy 4.3
before 5.2.2-150000.4.13.1
5.2.2-150000.4.13.1
giflib
SUSE:Manager Server 4.3
before 5.2.2-150000.4.13.1
5.2.2-150000.4.13.1
giflib
SUSE:Enterprise Storage 7.1
before 5.2.2-150000.4.13.1
5.2.2-150000.4.13.1
giflib
openSUSE:Leap 15.5
before 5.2.2-150000.4.13.1
5.2.2-150000.4.13.1
giflib
SUSE:Linux Enterprise Software Development Kit 12 SP5
before 5.0.5-13.3.1
5.0.5-13.3.1
giflib
SUSE:Linux Enterprise Server 12 SP5
before 5.0.5-13.3.1
5.0.5-13.3.1
giflib
SUSE:Linux Enterprise Server for SAP Applications 12 SP5
before 5.0.5-13.3.1
5.0.5-13.3.1
giflib
Ubuntu:Pro:16.04:LTS
before 5.1.4-0.3~16.04.1+esm1, plus listed versions
4.1.6-115.1.1-0ubuntu15.1.1-0.15.1.1-0.25.1.2-0.15.1.2-0.25.1.4-0.3~16.045.1.4-0.3~16.04.1
5.1.4-0.3~16.04.1+esm1
giflib
Ubuntu:Pro:18.04:LTS
before 5.1.4-2ubuntu0.1+esm1, plus listed versions
5.1.4-15.1.4-25.1.4-2ubuntu0.1
5.1.4-2ubuntu0.1+esm1
giflib
Ubuntu:20.04:LTS
before 5.1.9-1ubuntu0.1, plus listed versions
5.1.4-3ubuntu15.1.9-1
5.1.9-1ubuntu0.1
giflib
Ubuntu:22.04:LTS
before 5.1.9-2ubuntu0.1, plus listed versions
5.1.9-2build15.1.9-2build2
5.1.9-2ubuntu0.1
giflib
openSUSE:Tumbleweed
before 5.2.2-1.1
5.2.2-1.1

History

History
RecordedChangedSources
factsOSV
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-40633 is a high vulnerability (CVSS 8.8) in Giflib Project Giflib, published June 14, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.72%, the 77th percentile. Fixed in giflib 5.2.2-r0.

References

Show 25 moreShow less
MoveEnter Open