
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-26740 is a heap-based buffer overflow vulnerability in giflib v.5.2.2 that allows a remote attacker to cause a denial of service by processing a specially crafted GIF file. The flaw exists in the EGifGCBToExtension and EGifGCBToSavedExtension functions in egif_lib.c, which overwrite an existing Graphic Control Extension (GCE) block without validating its allocated size. It was disclosed on March 18, 2026, and affects giflib version 5.2.2 specifically. It carries a CVSS v3.1 base score of 8.2 (High) (Red Hat CVE, Red Hat Bugzilla).
The root cause (CWE-787: Out-of-bounds Write) lies in EGifGCBToSavedExtension in egif_lib.c, which iterates over saved image extension blocks and, upon finding an existing GCE block (ep->Function == GRAPHICS_EXT_FUNC_CODE), unconditionally calls EGifGCBToExtension(GCB, ep->Bytes) to write 4 bytes of GCE payload. If the input GIF contains a malformed GCE with a truncated byte count (e.g., 1 byte instead of the expected 4), ep->Bytes is allocated with only that smaller size during parsing, and the subsequent 4-byte write causes a heap buffer overflow. The attack vector is network-accessible and requires no authentication or user interaction — a victim application (such as giftool invoked with the -d delay-time flag) need only process the crafted GIF. A public PoC generator (gen_poc_giftool_gce_len1.py) and reproduction steps are available (PoC Disclosure, Red Hat Bugzilla).
The confirmed minimum impact is a Denial of Service (crash) of any application that processes a malicious GIF using the affected giflib functions. Because the vulnerability is a heap out-of-bounds write (memory corruption), there is a theoretical risk of further exploitation — such as arbitrary code execution — depending on the heap allocator layout and runtime environment, though this has not been demonstrated publicly. Integrity is assessed as low-impact (minor memory corruption), and confidentiality impact is assessed as none (PoC Disclosure, Red Hat CVE).
A public proof-of-concept exploit is available on GitHub, including a Python PoC generator script and reproduction steps confirmed with AddressSanitizer (PoC Disclosure). There is no evidence of in-the-wild exploitation at this time, and no threat actor attribution has been reported. The EPSS score is approximately 0.00139 (low probability of exploitation in the near term). The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The vulnerability is detectable by Nessus and Qualys scanners (Red Hat CVE).
gen_poc_giftool_gce_len1.py to create a GIF file containing a Graphics Control Extension block with a truncated byte count (e.g., 1 byte instead of the standard 4): python3 gen_poc_giftool_gce_len1.py > poc.gifpoc.gif to a target system or application that processes GIF files using giflib 5.2.2 — for example, by uploading it to a web service, sending it via email, or supplying it as input to a command-line tool.EGifGCBToSavedExtension on the malformed GIF. With giftool, this is triggered via the delay-time flag: ./giftool -d 1 < ./poc.gif > /dev/nullEGifGCBToExtension function writes 4 bytes into the 1-byte ep->Bytes allocation, causing a heap-buffer-overflow WRITE at the adjacent memory address, resulting in a crash (DoS) or potential memory corruption (PoC Disclosure).giftool, image processing daemons, Java splash screen components); core dump files generated by giflib-linked processes.EGifGCBToExtension or EGifGCBToSavedExtension in egif_lib.c if instrumented builds are in use.Upstream giflib has not yet released a patched version as of the time of disclosure; the fix is reportedly in the pipeline per giflib bug reports #199 and #201 on SourceForge (Red Hat Bugzilla). Red Hat has issued security errata (RHSA-2026:9254, RHSA-2026:9255, RHSA-2026:9693) for affected Red Hat products (Red Hat CVE). As a workaround, restrict processing of GIF files from untrusted or external sources, and implement input validation to reject GIF files with malformed GCE extension block sizes before they reach the vulnerable code path. Note that OpenJDK versions are not affected, as they do not ship the vulnerable egif_lib.c source (Red Hat Bugzilla).
Red Hat triaged the vulnerability as high severity and opened a security response bug, with community members inquiring about fix timelines for the Red Hat build of OpenJDK 21 (Red Hat Bugzilla). A Red Hat product security engineer clarified that OpenJDK is not affected because it does not ship the vulnerable egif_lib.c code, only the function declarations in a header file. The giflib upstream maintainers acknowledged the issue and indicated a fix is in progress via the giflib-devel mailing list. Coverage has appeared on Linux security news aggregators and pro-linux.de (Red Hat Bugzilla).
Fix availability across major Linux distributions and their releases.
bookworm
giflib: 5.2.1-2.5+deb12u1
sid
giflib: 6.1.3-1
trixie
giflib: 5.2.2-1+deb13u1
bionic (esm-infra)
giflib
devel
giflib: 6.1.3-1
focal (esm-infra)
giflib
jammy
giflib: 5.1.9-2ubuntu0.3
noble
giflib: 5.2.2-1ubuntu1.2
resolute
giflib: 5.2.2-1ubuntu3.2
xenial (esm-infra-legacy)
giflib
RHEL 8
:appstream:giflib-0:5.1.4-5.el8_10.src
RHEL 9
:appstream:java-1.8.0-openjdk-1:1.8.0-openjdk-1.8.0.492.b09-1.el9.src
RHEL 10
giflib-0:5.2.1-22.el10_0.2.src
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."