Heap-based Buffer Overflow Affecting giflib package, versions [,5.2.2)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.03% (8th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Heap-based Buffer Overflow vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-CONAN-GIFLIB-10075930
  • published8 May 2025
  • disclosed22 Nov 2023
  • creditNorbert

Introduced: 22 Nov 2023

CVE-2023-48161  (opens in a new tab)
CWE-122  (opens in a new tab)

How to fix?

Upgrade giflib to version 5.2.2 or higher.

Overview

Affected versions of this package are vulnerable to Heap-based Buffer Overflow via the DumpSCreen2RGB function in gif2rgb.c file. This vulnerability manifests when a specially crafted GIF is processed for output.

Note: It is important to note that the 5b74cd commit which effectively addresses CVE-2022-28506, does not provide a resolution for this particular heap-buffer overflow problem.

References

CVSS Base Scores

version 3.1