CVE-2026-112202 PUBLISHED

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

Assigner: CPANSec
Reserved: 19.10.2026 Published: 20.10.2026 Updated: 21.10.2026

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.

Product Status

Package Collection https://cpan.org/modules
Package Name Imager-File-GIF
Versions Default: unaffected
  • affected from 0 to 1.006 (excl.)
Package Collection https://cpan.org/modules
Package Name Imager
Versions Default: unaffected
  • affected from 0 to 1.040 (excl.)

Workarounds

Disable the gif_consolidate read option when processing untrusted GIF images.

Solutions

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

Credits

  • kumar-Prakash07 reporter

References

Problem Types

  • CWE-125 Out-of-bounds Read CWE