CVE-2025-31344
High · 7.3CVSS
7.3
EPSS
0.3%
Published
Apr 14, 2025
CISA due date
—
Cloudanix analysis
A problem in certain image-handling software on Linux systems could let someone who already has access to the computer cause crashes or run harmful code by opening bad image files.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Heap-based buffer overflow in gif2rgb.C that corrupts memory when processing malformed GIF input, enabling local code execution or denial of service.
Why it matters to the business
Attackers with local access can crash systems or execute arbitrary code, leading to service disruption and potential compromise of affected Linux environments; low exploit likelihood reduces urgency but still requires patching of giflib deployments.
How an attack unfolds
An attacker supplies a crafted GIF file to gif2rgb, triggering the overflow during parsing to overwrite heap structures and gain control of execution flow.
How to fix it
Upgrade giflib to a version beyond 5.2.2; no openssl fixed versions apply to this giflib flaw.
How to confirm the fix worked
Confirm giflib version is newer than 5.2.2 and test gif2rgb with known-good and malformed inputs to verify stability.
Typical attack path
- Identify a system running vulnerable giflib <= 5.2.2
- Craft a malicious GIF file that triggers the overflow in gif2rgb.C
- Execute gif2rgb against the file locally
- Achieve memory corruption for code execution or crash
How to detect it
Review process execution logs and file access for gif2rgb invocations involving untrusted GIFs; look for segmentation faults or heap-related crashes in system logs.
What your security team should do
- Prioritize inventory of giflib installations across Linux fleets
- Apply updates to giflib > 5.2.2 where present
- Monitor for local execution of gif2rgb on untrusted inputs
The record
Heap-based Buffer Overflow vulnerability in openEuler giflib on Linux. This vulnerability is associated with program files gif2rgb.C. This issue affects giflib: through 5.2.2.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.21 | giflib | 0 | 5.2.2-r1 |
| Alpine:v3.22 | giflib | 0 | 5.2.2-r1 |
| Debian:11 | giflib | 0 | No fix |
| Debian:12 | giflib | 0 | No fix |
| Debian:13 | giflib | 0 | No fix |
| Mageia:9 | giflib | 0 | 5.2.1-7.2.mga9 |
| SUSE:Enterprise Storage 7.1 | giflib | 0 | 5.2.2-150000.4.16.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | giflib | 0 | 5.2.2-150000.4.16.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | giflib | 0 | 5.2.2-150000.4.16.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | giflib | 0 | 5.2.2-150000.4.16.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | giflib | 0 | 5.2.2-150000.4.16.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | giflib | 0 | 5.2.2-150000.4.16.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | giflib | 0 | 5.2.2-150000.4.16.1 |
| SUSE:Linux Enterprise Server 12 SP5-LTSS | giflib | 0 | 5.0.5-13.9.1 |
| SUSE:Linux Enterprise Server 15 SP3-LTSS | giflib | 0 | 5.2.2-150000.4.16.1 |
| SUSE:Linux Enterprise Server 15 SP4-LTSS | giflib | 0 | 5.2.2-150000.4.16.1 |
| SUSE:Linux Enterprise Server 15 SP5-LTSS | giflib | 0 | 5.2.2-150000.4.16.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | giflib | 0 | 5.0.5-13.9.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | giflib | 0 | 5.2.2-150000.4.16.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | giflib | 0 | 5.2.2-150000.4.16.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP5 | giflib | 0 | 5.2.2-150000.4.16.1 |
| SUSE:Manager Proxy 4.3 | giflib | 0 | 5.2.2-150000.4.16.1 |
| SUSE:Manager Server 4.3 | giflib | 0 | 5.2.2-150000.4.16.1 |
| openSUSE:Leap 15.6 | giflib | 0 | 5.2.2-150000.4.16.1 |
Related vulnerabilities
- CVE-2024-45993 Giflib Project v5.2.2 is vulnerable to a heap buffer overflow via gif2rgb. Also affects giflib
- 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-23868 Giflib contains a double-free vulnerability that is the result of a shallow copy in… Also affects giflib
- CVE-2026-119727 A flaw was found in GStreamer's gst-plugins-bad H.265 video parser. CWE-122
- CVE-2026-110133 A flaw was found in Ghostscript. CWE-122
- CVE-2026-9536 A heap-based buffer overflow vulnerability exists in the vtkWindBladeReader… CWE-122
- CVE-2026-96198 Heap-based buffer overflow in Microsoft Edge (Chromium-based) allows an unauthorized… CWE-122
- CVE-2026-96199 Heap-based buffer overflow in Microsoft Edge (Chromium-based) allows an unauthorized… CWE-122