CVE-2026-8669: CWE-787 Out-of-bounds Write in TONYC Imager
Imager versions through 1.030 for Perl allow a heap out of bounds (OOB) write on crafted multi-frame GIF files. Imager::File::GIF's i_readgif_multi_low allocates a single per-row buffer GifRow sized for the GIF's global screen width 'SWidth' and reuses it across every image in the file. The page-match branch validates Image.Width + Image.Left > SWidth before each DGifGetLine write, but the parallel skip-image branch at imgif.c:790-805 calls DGifGetLine(GifFile, GifRow, Width) with no such check.
AI Analysis
Technical Summary
The vulnerability exists in the Imager::File::GIF module of TONYC Imager, specifically in the i_readgif_multi_low function. This function allocates a buffer GifRow based on the GIF's global screen width (SWidth) and reuses it for all frames. While one code path checks that Image.Width + Image.Left does not exceed SWidth before writing, another code path (the skip-image branch) calls DGifGetLine with Width without this validation, causing a heap out-of-bounds write (CWE-787) when processing crafted multi-frame GIF files.
Potential Impact
Successful exploitation could lead to heap memory corruption due to out-of-bounds writes. This may cause application crashes or potentially enable arbitrary code execution depending on the context in which the Imager library is used. However, no known exploits are reported in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch links are provided at this time. Users should monitor for updates from the TONYC project or CPANSec for a patch addressing this vulnerability. Until then, avoid processing untrusted multi-frame GIF files with affected versions of Imager.
CVE-2026-8669: CWE-787 Out-of-bounds Write in TONYC Imager
Description
Imager versions through 1.030 for Perl allow a heap out of bounds (OOB) write on crafted multi-frame GIF files. Imager::File::GIF's i_readgif_multi_low allocates a single per-row buffer GifRow sized for the GIF's global screen width 'SWidth' and reuses it across every image in the file. The page-match branch validates Image.Width + Image.Left > SWidth before each DGifGetLine write, but the parallel skip-image branch at imgif.c:790-805 calls DGifGetLine(GifFile, GifRow, Width) with no such check.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability exists in the Imager::File::GIF module of TONYC Imager, specifically in the i_readgif_multi_low function. This function allocates a buffer GifRow based on the GIF's global screen width (SWidth) and reuses it for all frames. While one code path checks that Image.Width + Image.Left does not exceed SWidth before writing, another code path (the skip-image branch) calls DGifGetLine with Width without this validation, causing a heap out-of-bounds write (CWE-787) when processing crafted multi-frame GIF files.
Potential Impact
Successful exploitation could lead to heap memory corruption due to out-of-bounds writes. This may cause application crashes or potentially enable arbitrary code execution depending on the context in which the Imager library is used. However, no known exploits are reported in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch links are provided at this time. Users should monitor for updates from the TONYC project or CPANSec for a patch addressing this vulnerability. Until then, avoid processing untrusted multi-frame GIF files with affected versions of Imager.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- CPANSec
- Date Reserved
- 2026-05-15T11:19:04.001Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a072c17ec166c07b052b15b
Added to database: 5/15/2026, 2:22:15 PM
Last enriched: 5/15/2026, 2:36:40 PM
Last updated: 5/15/2026, 4:25:45 PM
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.