# CVE-2026-23868: Use after free in giflib

> A double-free vulnerability in Giflib allows attackers to potentially execute arbitrary code or cause denial of service via crafted GIF files.

- **Severity:** Medium 5.1 (`CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Mar 2026
- **Updated:** 15 Jul 2026
- **Also known as:** ALSA-2026:19154, ALSA-2026:19367, ALSA-2026:8858, ALSA-2026:8859, ALSA-2026:8861, AZL-79662, BELL-CVE-2026-23868, CLEANSTART-2026-DA25552, CLSA-2026-1776936280, CLSA-2026-1776943678, DEBIAN-CVE-2026-23868, ECHO-77a1-940a-2ce8, GHSA-hq9h-682q-jg37, JLSEC-2026-821, MGASA-2026-0103, OESA-2026-1972, OESA-2026-1973, OESA-2026-1974, OESA-2026-1975, OESA-2026-1976, OESA-2026-2094, RHSA-2026:19154, RHSA-2026:19367, RHSA-2026:8858, RHSA-2026:8859, RHSA-2026:8861, RHSA-2026:8883, RHSA-2026:8884, RHSA-2026:8885, RHSA-2026:8886, RHSA-2026:8887, RHSA-2026:9290, RHSA-2026:9291, RHSA-2026:9292, RHSA-2026:9294, RHSA-2026:9295, RLSA-2026:19154, RLSA-2026:19367, RLSA-2026:8858, RLSA-2026:8859, RLSA-2026:8861, SUSE-SU-2026:1338-1, SUSE-SU-2026:21368-1, UBUNTU-CVE-2026-23868, openSUSE-SU-2026:10326-1, openSUSE-SU-2026:20601-1

## What is CVE-2026-23868?

CVE-2026-23868 is a medium-severity use after free vulnerability in giflib, published on 10 Mar 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Giflib contains a double-free vulnerability that is the result of a shallow copy in GifMakeSavedImage and incorrect error handling. The conditions needed to trigger this vulnerability are difficult but may be possible.

Weakness: CWE-825 (Expired Pointer Dereference), CWE-415 (Double Free)

## Which versions are affected by CVE-2026-23868?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `giflib` | AlmaLinux:10 | All versions | 5.2.1-22.el10_1.1 |
| `giflib` | AlmaLinux:10 | All versions | 5.2.1-24.el10_2 |
| `giflib-devel` | AlmaLinux:10 | All versions | 5.2.1-22.el10_1.1 |
| `giflib-devel` | AlmaLinux:10 | All versions | 5.2.1-24.el10_2 |
| `giflib` | AlmaLinux:8 | All versions | 5.1.4-4.el8_10 |
| `giflib-devel` | AlmaLinux:8 | All versions | 5.1.4-4.el8_10 |
| `giflib` | AlmaLinux:9 | All versions | 5.2.1-10.el9_8.1 |
| `giflib` | AlmaLinux:9 | All versions | 5.2.1-9.el9_7.1 |
| `giflib-devel` | AlmaLinux:9 | All versions | 5.2.1-10.el9_8.1 |
| `giflib-devel` | AlmaLinux:9 | All versions | 5.2.1-9.el9_7.1 |
| `giflib` | Red Hat:enterprise_linux:10.1 | All versions | 0:5.2.1-22.el10_1.1 |
| `giflib-debuginfo` | Red Hat:enterprise_linux:10.1 | All versions | 0:5.2.1-22.el10_1.1 |
| `giflib-debugsource` | Red Hat:enterprise_linux:10.1 | All versions | 0:5.2.1-22.el10_1.1 |
| `giflib-devel` | Red Hat:enterprise_linux:10.1 | All versions | 0:5.2.1-22.el10_1.1 |
| `giflib-utils-debuginfo` | Red Hat:enterprise_linux:10.1 | All versions | 0:5.2.1-22.el10_1.1 |
| `giflib` | Red Hat:enterprise_linux:10.2 | All versions | 0:5.2.1-24.el10_2 |
| `giflib-debuginfo` | Red Hat:enterprise_linux:10.2 | All versions | 0:5.2.1-24.el10_2 |
| `giflib-debugsource` | Red Hat:enterprise_linux:10.2 | All versions | 0:5.2.1-24.el10_2 |
| `giflib-devel` | Red Hat:enterprise_linux:10.2 | All versions | 0:5.2.1-24.el10_2 |
| `giflib-utils-debuginfo` | Red Hat:enterprise_linux:10.2 | All versions | 0:5.2.1-24.el10_2 |
| `giflib` | Red Hat:enterprise_linux:8::appstream | All versions | 0:5.1.4-4.el8_10 |
| `giflib-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:5.1.4-4.el8_10 |
| `giflib-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:5.1.4-4.el8_10 |
| `giflib-utils-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:5.1.4-4.el8_10 |
| `giflib-debuginfo` | Red Hat:enterprise_linux:8::crb | All versions | 0:5.1.4-4.el8_10 |
| `giflib-debugsource` | Red Hat:enterprise_linux:8::crb | All versions | 0:5.1.4-4.el8_10 |
| `giflib-devel` | Red Hat:enterprise_linux:8::crb | All versions | 0:5.1.4-4.el8_10 |
| `giflib-utils-debuginfo` | Red Hat:enterprise_linux:8::crb | All versions | 0:5.1.4-4.el8_10 |
| `giflib` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.2.1-10.el9_8.1 |
| `giflib` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.2.1-9.el9_7.1 |
| `giflib-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.2.1-10.el9_8.1 |
| `giflib-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.2.1-9.el9_7.1 |
| `giflib-debugsource` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.2.1-10.el9_8.1 |
| `giflib-debugsource` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.2.1-9.el9_7.1 |
| `giflib-utils-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.2.1-10.el9_8.1 |
| `giflib-utils-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:5.2.1-9.el9_7.1 |
| `giflib-debuginfo` | Red Hat:enterprise_linux:9::crb | All versions | 0:5.2.1-10.el9_8.1 |
| `giflib-debuginfo` | Red Hat:enterprise_linux:9::crb | All versions | 0:5.2.1-9.el9_7.1 |
| `giflib-debugsource` | Red Hat:enterprise_linux:9::crb | All versions | 0:5.2.1-10.el9_8.1 |
| `giflib-debugsource` | Red Hat:enterprise_linux:9::crb | All versions | 0:5.2.1-9.el9_7.1 |

Products: Giflib Project Giflib.

## How do I fix CVE-2026-23868?

Apply the vendor's patch.

## Is CVE-2026-23868 being exploited?

There is no known exploitation of CVE-2026-23868 in the wild and no public exploit code.

## Other vulnerabilities in giflib

- [CVE-2016-3177](https://insights.sbomify.com/CVE-2016-3177/): Use after free in n/a (critical 9.8)
- [CVE-2021-40633](https://insights.sbomify.com/CVE-2021-40633/): Denial of service in n/a (high 8.8)
- [CVE-2018-11489](https://insights.sbomify.com/CVE-2018-11489/): Memory corruption in n/a (high 8.8)
- [CVE-2026-26740](https://insights.sbomify.com/CVE-2026-26740/): Memory corruption in n/a (high 8.2)
- [CVE-2023-48161](https://insights.sbomify.com/CVE-2023-48161/): Memory corruption in n/a (high 7.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-23868 and fix it if it is affected.

What it is: CVE-2026-23868 is a medium-severity use after free vulnerability in giflib, published on 10 Mar 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-23868 in the wild and no public exploit code.

Affected product: giflib. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-23868/ (Markdown: https://insights.sbomify.com/CVE-2026-23868/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-23868
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-23868
- OSV: https://osv.dev/vulnerability/CVE-2026-23868

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-23868/
Summaries are generated and may contain mistakes; the official description above is the record.
