---
id: "CVE-2026-112202"
kind: "vulnerability"
aliases: ["CVE-2026-112202"]
title: "Perl Imager::File::GIF: out-of-bounds read leaks heap memory from crafted GIF"
severity: "low"
cvss: null
epss: 0.00229
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["image-processing", "imager", "package", "perl"]
not_affected_if: ["default-config", "no-untrusted-gif-input"]
published_at: "2026-10-20T23:17:01+00:00"
first_seen_at: "2026-10-23T21:57:27+00:00"
updated_at: "2026-10-25T05:04:07+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-112202", "first_seen_at": "2026-10-23T21:57:27+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-112202", "first_seen_at": "2026-10-24T13:15:55+00:00"}]
---

# Perl Imager::File::GIF: out-of-bounds read leaks heap memory from crafted GIF

Imager::File::GIF before 1.006 for Perl reads past a heap buffer when consolidating GIF palettes with gif_consolidate enabled. A crafted GIF can leak adjacent heap bytes into decoded output or crash the process.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- `perl -MImager::File::GIF -e 'print $Imager::File::GIF::VERSION'` to read the installed version
- Search application code for `gif_consolidate` set to a true value
- Check whether the bundled Imager distribution in use includes the GIF reader

## Fix

- Upgrade Imager::File::GIF to `1.006` or later
- Or stop passing `gif_consolidate => 1` when reading GIFs

## Timeline

- 2026-10-23T21:57:27+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-112202
- 2026-10-24T13:15:55+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-112202

## From the sources

Imager::File::GIF versions before 1.006 for Perl allow out-of-bounds reads when consolidating GIF images.

With `gif_consolidate => 1`, palette indices from the image are used without checking the colour table's bounds. The i_readgif_low routine reads beyond the heap allocation and copies the bytes into output pixels. The default GIF reader is not affected.

The same code ships bundled in the Imager distribution.

An attacker supplying a crafted GIF can disclose adjacent heap memory through the decoded output and may crash the process.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
