CVE-2024-45993
Medium · 6.5CVSS
6.5
EPSS
0.4%
Published
Sep 30, 2024
CISA due date
—
Cloudanix analysis
A bug in a popular tool that converts GIF images could let attackers crash programs or run harmful code when a bad image file is processed.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Other
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Heap buffer overflow in the gif2rgb utility of giflib 5.2.2 caused by insufficient bounds checking when converting a specially crafted GIF file, resulting in memory corruption.
Why it matters to the business
Systems that process untrusted GIF images with gif2rgb face risk of crashes or potential arbitrary code execution, disrupting image-handling pipelines and requiring urgent patching across any dependent applications or tools.
How an attack unfolds
An attacker creates a malicious GIF file that exceeds expected buffer sizes during gif2rgb processing; when the target system invokes gif2rgb on the file, the overflow corrupts heap memory and may allow code execution or denial of service.
How to fix it
Upgrade giflib to the latest version that resolves the heap buffer overflow in gif2rgb; rebuild any dependent tools and verify that no remaining instances of version 5.2.2 remain in use.
How to confirm the fix worked
Confirm giflib version is not 5.2.2 by running gif2rgb --version or inspecting package metadata; test conversion of known-good GIF files to ensure normal operation after upgrade.
Typical attack path
- Locate systems or scripts that invoke gif2rgb on external GIF inputs
- Craft a GIF file engineered to trigger the heap overflow in giflib 5.2.2
- Deliver the file through upload, command-line argument, or automated processing workflow
- Trigger gif2rgb conversion to execute the overflow and achieve memory corruption
How to detect it
Review process execution logs and command history for invocations of gif2rgb against untrusted or externally supplied GIF files; examine crash dumps or memory error reports that reference giflib heap operations.
What your security team should do
- Immediately inventory all uses of giflib and gif2rgb across build pipelines and runtime environments
- Prioritize upgrade of giflib beyond version 5.2.2 in all affected packages
- Add input sanitization or sandboxing for any remaining image conversion steps until patched
- Monitor for new releases and apply updates within standard change windows
The record
Giflib Project v5.2.2 is vulnerable to a heap buffer overflow via gif2rgb.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Chainguard | giflib | 0 | 6.1.2-r0 |
| Chainguard | giflib-dev | 0 | 6.1.2-r0 |
| Chainguard | giflib-doc | 0 | 6.1.2-r0 |
| Chainguard | giflib-utils | 0 | 6.1.2-r0 |
| Debian:11 | giflib | 0 | No fix |
| Debian:12 | giflib | 0 | No fix |
| Debian:13 | giflib | 0 | No fix |
| Ubuntu:20.04:LTS | giflib | 0 | No fix |
| Ubuntu:22.04:LTS | giflib | 0 | No fix |
| Ubuntu:24.04:LTS | giflib | 0 | No fix |
| Ubuntu:24.10 | giflib | 0 | No fix |
| Ubuntu:25.04 | giflib | 0 | No fix |
| Ubuntu:25.10 | giflib | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | giflib | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | giflib | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | giflib | 0 | No fix |
| Wolfi | giflib | 0 | 6.1.2-r0 |
| Wolfi | giflib-dev | 0 | 6.1.2-r0 |
| Wolfi | giflib-doc | 0 | 6.1.2-r0 |
| Wolfi | giflib-utils | 0 | 6.1.2-r0 |
Related vulnerabilities
- CVE-2016-3977 Heap-based buffer overflow in util/gif2rgb.c in gif2rgb in giflib 5.1.2 allows remote… Also affects giflib
- CVE-2026-111497 A buffer overflow vulnerability in the Brotli decoder (c/dec/decode.c) in Google Brotli… CWE-787
- CVE-2026-112397 Pillow is a Python imaging library. CWE-787
- CVE-2026-112059 libLAS through 1.8.1 contains a heap out-of-bounds write vulnerability in the point… CWE-787
- CVE-2026-89088 A flaw was found in parted. CWE-787
- CVE-2026-89085 A flaw was found in parted. CWE-787
- CVE-2026-85746 MariaDB server is a community developed fork of MySQL server. CWE-787
- CVE-2026-107815 MariaDB server is a community developed fork of MySQL server. CWE-787