CVE-2026-13705 Details
Description
Imager versions before 1.032 for Perl have a heap out-of-bounds read in the bundled Imager::File::SGI reader via a 16-bit RLE literal run in read_rgb_16_rle. read_rgb_16_rle guards each literal run with if (count > data_left), but count is a pixel count while every 16-bit sample consumes two bytes. The copy loop reads inp[0] * 256 + inp[1] and advances two bytes per pixel, so a run with data_left / 2 < count <= data_left passes the guard yet consumes 2 * count bytes and reads past the end of the buffer. The 8-bit path is unaffected because there one pixel is one byte. Reading a crafted SGI image through Imager->read triggers the over-read before the parser rejects the malformed image, which can crash the process.
A heap out-of-bounds read vulnerability has been identified in the Imager Perl module, specifically in versions prior to 1.032. The issue arises in the bundled Imager::File::SGI reader when processing 16-bit RLE literal runs. The vulnerability occurs because the read_rgb_16_rle function improperly calculates the available data, allowing crafted SGI images to be read in a way that exceeds buffer limits. This flaw can lead to memory over-read conditions, potentially causing application crashes.
Users can upgrade to Imager version 1.032 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 6, 2026CISA-ADP
Assessed Jul 6, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/tonycoz/imager/commit/f28de02770dfc26ffbdc32048970ed84babbf730.patch | CPANSec | Source CodeVendor |
| https://metacpan.org/release/TONYC/Imager-1.032/source/Changes | CPANSec | Release NotesVendor |
| http://www.openwall.com/lists/oss-security/2026/07/06/3 | CVE |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-125 | Out-of-bounds Read | CPANSec |
Affected Products
| Product | Versions |
|---|---|
| Imager | < 1.032 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 25, 2026 | CVE Translated | [email protected] |
| Jul 6, 2026 | CVE Modified | CISA-ADP |
| Jul 6, 2026 | CVE Modified | CVE |
| Jul 6, 2026 | New CVE Received | CPANSec |
Volerion