Executive brief
Giflib, a widely used library for processing GIF images, contains a flaw in how it handles memory during image processing. An attacker could potentially exploit this to cause a system crash or service disruption by providing a specially crafted image file. While the conditions to trigger this are difficult to meet, it affects various systems that rely on this library for image rendering, including several Red Hat Enterprise Linux versions.
Technical details
A double-free vulnerability exists in Giflib within the `GifMakeSavedImage` function in `gifalloc.c`. The root cause is a shallow copy of image data combined with incorrect error handling; if an allocation fails partway through the process, the library may attempt to free the same memory address twice. Specifically, the function fails to null out aliased pointers (`ColorMap`, `RasterBits`, `ExtensionBlocks`) before subsequent allocations, leading `FreeLastSavedImage` to release already-freed data from the source object. Exploitation typically requires a local attack vector with high complexity, potentially leading to a denial-of-service (DoS). Patches have been identified in the SourceForge repository that null out these pointers before new allocations occur.
Affected products
- giflib giflib 5.0.0 through 6.1.1
- Red Hat Enterprise Linux 7, 8, 10
- Red Hat AI Inference Server 3.3.3
Timeline
- 2026-03-10: advisory: Initial advisory published by Facebook and NVD
- 2026-03-10: patched: Patch committed to giflib SourceForge repository
- 2026-05-11: advisory: Red Hat published multiple security advisories (RHSA) for affected products
References
- https://sourceforge.net/p/giflib/code/ci/f5b7267aed3665ef025c13823e454170d031c106/tree/gifalloc.c?diff=5146815377b7395944cb683a08c43eee3f631eb7
- https://www.facebook.com/security/advisories/cve-2026-23868
- https://access.redhat.com/errata/RHSA-2026:16008
- https://access.redhat.com/errata/RHSA-2026:16009
- https://access.redhat.com/errata/RHSA-2026:16030
- https://access.redhat.com/errata/RHSA-2026:16174
- https://access.redhat.com/errata/RHSA-2026:19154