Imager::File::GIF CVE-2026-112202
MEDIUMAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft GIF with undersized colour table and out-of-range LZW indices
-
DeliverySupply file to app decoding with gif_consolidate => 1
-
ExploitUnbounded palette index dereferences colour map in i_readgif_low
-
ExecutionOut-of-bounds heap bytes written into output pixel RGB
-
ImpactDisclose adjacent heap memory via decoded image or crash process
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK
1 technique across 1 tactic: Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the consuming application to invoke the Imager GIF reader with the non-default option gif_consolidate => 1 (which dispatches to i_readgif_wiol -> i_readgif_low); the default read path calls the already-guarded i_readgif_multi_low and is not vulnerable. The attacker controls only the GIF file and must supply one declaring a small colour table (power-of-two 2-256 entries) whose LZW-decoded pixel indices exceed ColorMap->ColorCount. Heap disclosure further requires that the decoded output (pixel data) be observable by the attacker. The flaw is capped at Moderate precisely because this non-default configuration limits the attack surface; versions Imager::File::GIF <= 1.005 and bundled Imager <= 1.039 are affected. |
| Impact | This is a genuinely moderate issue rather than an overstated high-severity one, and the signals are consistent rather than conflicting. The CVSS 3.1 base vector (AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L, score 6.5) reflects an unauthenticated network-reachable flaw with low confidentiality impact (heap disclosure) and low availability impact (process crash), no integrity impact, and no scope change - which aligns well with the GHSA advisory describing a CWE-125 out-of-bounds read confirmed under AddressSanitizer. However, the base vector does not capture the single most important limiting factor established by both the advisory and the source diff: the vulnerable i_readgif_low path is reached ONLY when the caller passes the documented, non-default gif_consolidate => 1 read option; the default GIF reader (i_readgif_multi_low) already bounds-checks the index and is unaffected. EPSS is low at 0.23% (13th percentile), there is no CISA KEV listing, and no confirmed working public exploit code was provided - so active or widespread exploitation is not indicated. The vuln.today decision label is 'this_month', i.e. a routine patch priority, not an emergency. Net: real but constrained; priority should be driven by whether any deployed application actually uses gif_consolidate on untrusted input, not by the headline CVSS. |
| Exploit ScenarioDerived | An application that decodes user-supplied GIF files through Imager with the non-default gif_consolidate => 1 option receives a crafted GIF whose color table declares few entries (e.g. 2) while its LZW stream decodes to larger palette indices. During consolidation, i_readgif_low dereferences the color map past its allocation, copying adjacent heap bytes into the output image pixels (disclosing heap memory to anyone who can see the decoded result) or reading into an unmapped page and crashing the process. No public working exploit code was identified at the time of analysis, though the out-of-bounds read was confirmed by the maintainer with AddressSanitizer. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 30, 2026
Heap out-of-bounds read in Imager::File::GIF (versions through 1.005, and the same code bundled in Imager through 1.039) allows a crafted GIF whose LZW-decoded palette indices exceed the file's declared colour-table size to copy adjacent heap bytes into the decoded pixel data or, with a far out-of-range index, to read into an unmapped page and crash the process. The flaw is only reachable when the consuming application decodes a GIF through the non-default gif_consolidate => 1 read option, which dispatches to i_readgif_low; the default path uses the already-bounded i_readgif_multi_low and is unaffected, which is why the issue is scored 6.5 (AV:N/AC:L/PR:N/UI:N/C:L/I:N/A:L, CWE-125). EPSS is 0.23% (13th percentile), the CVE is not in CISA KEV, and no public exploit has been identified at time of analysis; vendor fixes are released as Imager::File::GIF 1.006 and Imager 1.040.
RemediationAI
Vendor-released patch: Imager::File::GIF 1.006 and Imager 1.040. Upgrade to Imager::File::GIF 1.006 (or later) for the standalone module, and to Imager 1.040 (or later) wherever the bundled copy is in use, then rebuild/redeploy the consuming Perl application so the XS code is recompiled; the fix commit is https://github.com/tonycoz/imager/commit/dec96f12b3d8a7fd94e86264953a5e4919dd6036.patch and release notes are at https://metacpan.org/release/TONYC/Imager-File-GIF-1.006/changes and https://metacpan.org/release/TONYC/Imager-1.040/changes, with full details in advisory GHSA-v4hp-5h6w-9897. Where upgrading is not immediately possible, remove or disable the non-default gif_consolidate => 1 read option so that GIF decoding falls through to the guarded i_readgif_multi_low path; this is the vendor-identified mitigation and the only complete fix is updating, but note the trade-off that consolidating multi-frame/animated GIFs into a single image will no longer work and applications relying on that behaviour will see changed output or must handle frames individually. Because the read is only exploitable when attacker-supplied GIFs reach that option, also avoid feeding untrusted uploads to any code path that enables gif_consolidate until the patched version is deployed.
Affected ProductsAI
Imager::File::GIF versions 1.005 and earlier (fixed in 1.006) and the Imager distribution versions 1.039 and earlier (fixed in 1.040), which ships the same GIF/imgif.c reader code. The vulnerability exists in both the standalone CPAN module and the bundled copy, so installing Imager alone provides no protection. The vulnerable function is reached only when an application invokes the Imager GIF reader with the non-default gif_consolidate => 1 option; the default GIF read path calls i_readgif_multi_low and is not affected. Vendor advisory: https://github.com/tonycoz/imager/security/advisories/GHSA-v4hp-5h6w-9897, with the upstream fix commit at https://github.com/tonycoz/imager/commit/dec96f12b3d8a7fd94e86264953a5e4919dd6036.patch and release notes at https://metacpan.org/release/TONYC/Imager-File-GIF-1.006/changes and https://metacpan.org/release/TONYC/Imager-1.040/changes.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The affected code is the C implementation behind the Perl Imager::File::GIF module (GIF/imgif.c), which drives giflib's DGifGetLine() LZW decoder. giflib allocates ColorMap->Colors as a heap array of exactly ColorMap->ColorCount GifColorType entries, where ColorCount is a power-of-two value between 2 and 256 taken from the GIF's colour-table-size field. The decoded row bytes (GifRow[x], a GifPixelType / unsigned char in the range 0-255) are used directly as an index into that array at the interlaced and non-interlaced decode loops of i_readgif_low(). giflib does not cross-validate decoded indices against the palette size: the LZW minimum code size is independent of palette size, and even minimum code size 2 initialises four codes (0-3) against a two-entry palette, so any index >= ColorCount reads past the heap allocation (CWE-125). The same class of bug is already guarded in the default reader i_readgif_multi_low(), making this a missed sibling case; the shipped fix adds an explicit index >= ColorMap->ColorCount check in both loops of i_readgif_low() and substitutes a black pixel for invalid indices. Reachability is gated at the Perl layer: GIF/GIF.pm routes to the vulnerable i_readgif_wiol()/i_readgif_low() only when gif_consolidate => 1 is set, otherwise it calls the guarded i_readgif_single_wiol()/i_readgif_multi_low() path.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
Attacker-supplied file processed over the network with no auth or interaction (AV:N/AC:L/PR:N/UI:N); heap read yields low confidentiality (C:L), possible crash low availability (A:L), no integrity impact.
Primary rating from Vendor (9b29abf9-4ab0-4765-b253-1875cd9b441e).
CVSS VectorVendor: 9b29abf9-4ab0-4765-b253-1875cd9b441e
Lifecycle Timeline
2DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB