CVE-2026-112202

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

Published Oct 20, 2026 CVSS 3.1 · 6.5 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

Imager::File::GIF prior to version 1.006 performs a consolidation of GIF images when the gif_consolidate option is enabled, but it fails to validate the palette indices against the bounds of the colour table. The underlying i_readgif_low routine thus reads beyond the allocated heap space and copies the raw bytes into the output pixel buffer, effectively leaking adjacent heap memory and potentially corrupting memory enough to crash the process.

Affected Systems

Perl libraries Imager::File::GIF versions before 1.006 and the bundled copy within the Imager distribution are affected. The same flaw also exists in older Imager releases before 1.040, because they ship the vulnerable Imager::File::GIF code internally. Users of any Perl application that relies on these libraries and processes untrusted GIF image files are at risk.

Risk and Exploitability

Explicit exploitation requires delivery of a crafted GIF file to the vulnerable application, and the attacker must trigger the gif_consolidate option when decoding the image. No public exploit or exploit code has been disclosed, and the EPSS score is < 1%. The CVSS score of 6.5 indicates moderate severity. The lack of KEV listing means the vulnerability has not yet been widely exploited. The potential impact of leaking sensitive data or causing a denial-of-service makes this a high-value target if the conditions for exploitation are met.

Remediation

Vendor Solution

Upgrade to Imager-File-GIF 1.006 or later, or to Imager 1.040 or later if the bundled copy is in use.


Vendor Workaround

Disable the gif_consolidate read option when processing untrusted GIF images.


OpenCVE Recommended Actions

  • Upgrade Imager::File::GIF to version 1.006 or newer, or upgrade to Imager 1.040 or newer if using the bundled copy that includes version 1.006 of Imager::File::GIF.
  • Disable the gif_consolidate option when processing untrusted GIF images so that palette indices are not used without bounds checking.
  • Audit all Perl applications that depend on Imager to ensure they are using a patched library and that the gif_consolidate option is only enabled for trusted image sources.

Generated by OpenCVE AI on October 30, 2026 at 14:34 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L'}

Type Values Removed Values Added
Description 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.
Title Imager::File::GIF versions before 1.006 for Perl allow out-of-bounds reads when consolidating GIF images
Weaknesses CWE-125
References

Subscriptions

No data.

Weaknesses

Sources

Status
PUBLISHED
Assigner
CPANSec
Published
Updated
Oct 30, 2026, 1:03 PM
Reserved
Oct 19, 2026, 10:02 AM
Status
Awaiting Analysis
Published
Oct 20, 2026, 11:17 PM
Modified
Oct 30, 2026, 1:18 PM