Security Vulnerability Report
中文
CVE-2026-8454 CVSS 5.3 MEDIUM

CVE-2026-8454

Published: 2026-05-15 12:17:09
Last Modified: 2026-05-15 22:16:57
Source: 9b29abf9-4ab0-4765-b253-1875cd9b441e

Description

Imager::File::GIF versions through 1.002 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.

CVSS Details

CVSS Score
5.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L

Configurations (Affected Products)

No configuration data available.

Imager::File::GIF <= 1.002

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/perl use strict; use warnings; use Imager; # PoC for CVE-2026-8454 # This script demonstrates how to trigger the vulnerability by reading a crafted GIF. # You need to replace 'crafted_exploit.gif' with a file that has a frame width > global screen width. my $filename = 'crafted_exploit.gif'; # Check if file exists unless (-e $filename) { print "Please create a crafted GIF file named $filename first.\n"; print "The file should have a multi-frame structure where one frame's width exceeds the global screen width.\n"; exit(1); } my $img = Imager->new(); # Trigger the vulnerable read function # The bug occurs in i_readgif_multi_low when processing the skip-image branch my $read_result = $img->read(file => $filename); if ($read_result) { print "Image loaded successfully (Vulnerability may not have been triggered or was handled).\n"; } else { print "Failed to load image: " . $img->errstr . "\n"; print "This might indicate a crash due to the Heap OOB write.\n"; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-8454", "sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e", "published": "2026-05-15T12:17:09.330", "lastModified": "2026-05-15T22:16:56.737", "vulnStatus": "Awaiting Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "Imager::File::GIF versions through 1.002 for Perl allow a heap out of bounds (OOB) write on crafted multi-frame GIF files.\n\nImager::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.\n\nThe 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."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "LOW"}, "exploitabilityScore": 1.8, "impactScore": 3.4}]}, "weaknesses": [{"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-787"}]}], "references": [{"url": "https://github.com/tonycoz/imager/commit/782e9c06cc75a0f7eed383f39522f51f44598b04.patch", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"}, {"url": "https://metacpan.org/release/TONYC/Imager-File-GIF-1.003/source/Changes", "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"}, {"url": "http://www.openwall.com/lists/oss-security/2026/05/15/15", "source": "af854a3a-2127-422b-91ae-364da2661108"}]}}