# CVE-2026-26740: giflib buffer overflow in EGifGCBToExtension

Source: https://junglewise.ai/threats/cve-2026-26740-giflib-buffer-overflow-in-egifgcbtoextension  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-03-18. Updated: 2026-06-30  
License: CC BY 4.0 with a link back

CVE-2026-26740 · Severity: high · CVSS 8.2 · Published 2026-03-18

A vulnerability has been identified in giflib, a widely used library for processing GIF images. An attacker can exploit this flaw by providing a specially crafted image file, which could cause applications using the library to crash or behave unexpectedly. This may lead to a disruption of services that rely on image processing, such as web servers or document viewers.

Technologies: [Red Hat Enterprise Linux 10](https://junglewise.ai/threats/technologies/enterprise-linux-10), [Red Hat Enterprise Linux 6](https://junglewise.ai/threats/technologies/enterprise-linux-6), [Red Hat Enterprise Linux 8](https://junglewise.ai/threats/technologies/enterprise-linux-8), [Red Hat Enterprise Linux 9](https://junglewise.ai/threats/technologies/enterprise-linux-9). Vendors: [Red Hat](https://junglewise.ai/threats/vendors/red-hat).

## Quick answers

**Is CVE-2026-26740 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-26740 being exploited in the wild.

**How severe is CVE-2026-26740?** High severity, with a CVSS score of 8.2, published 18 March 2026.

**Which products and versions are affected?** Giflib Project Giflib 5.2.2.

**Is there a fix for CVE-2026-26740?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-26740 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-26740?** Check whether you run Giflib Project Giflib, Red Hat Enterprise Linux 10, Red Hat Enterprise Linux 6 or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A buffer overflow vulnerability exists in giflib version 5.2.2 within the EGifGCBToExtension and EGifGCBToSavedExtension functions in egif_lib.c. The issue stems from the library overwriting an existing Graphic Control Extension (GCE) block without properly validating the allocated size of the destination buffer. A remote, unauthenticated attacker can exploit this by providing a malformed GIF, leading to an out-of-bounds write. This can result in a denial of service (application crash) or potentially limited data corruption. While a fix was reported to be in the pipeline by upstream maintainers, it was not yet fully resolved at the time of the advisory.

## Affected products

- giflib project giflib 5.2.2
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat Enterprise Linux 10

## Timeline

- 2026-03-18: disclosed: Initial disclosure of CVE-2026-26740
- 2026-03-18: advisory: NVD publication date

## References

- [https://github.com/zakkanijia/POC/blob/main/giflib/giftool/giflib_giftool_gce_len_heap_oobwrite_disclosure.md](https://github.com/zakkanijia/POC/blob/main/giflib/giftool/giflib_giftool_gce_len_heap_oobwrite_disclosure.md)
- [https://access.redhat.com/security/cve/CVE-2026-26740](https://access.redhat.com/security/cve/CVE-2026-26740)
- [https://bugzilla.redhat.com/show_bug.cgi?id=2448747](https://bugzilla.redhat.com/show_bug.cgi?id=2448747)
- [https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-26740.json](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-26740.json)

## Related threats

- [Red Hat yggdrasil-worker-package-manager argument injection in APT backend](https://junglewise.ai/threats/cve-2026-18157-red-hat-yggdrasil-worker-package-manager-argument-injection-in)
- [Samba AD DC LDAP filter injection and ACL bypass in Compare requests](https://junglewise.ai/threats/cve-2026-58222-samba-ad-dc-ldap-filter-injection-and-acl-bypass-in-compare)
- [Samba KDC out-of-bounds read in kpasswd service](https://junglewise.ai/threats/cve-2026-58216-samba-kdc-out-of-bounds-read-in-kpasswd-service)
- [Samba internal DNS server denial of service via TKEY cache exhaustion](https://junglewise.ai/threats/cve-2026-58218-samba-internal-dns-server-denial-of-service-via-tkey-cache)
- [Red Hat PCP auth bypass in pmproxy /store endpoint](https://junglewise.ai/threats/cve-2026-16527-red-hat-pcp-auth-bypass-in-pmproxy-store-endpoint)
