{"id":"CVE-2026-13705","state":"PUBLISHED","title":"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","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.\n\nread_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.\n\nReading a crafted SGI image through Imager->read triggers the over-read before the parser rejects the malformed image, which can crash the process.","publishedAt":"2026-07-06T12:03:38.513Z","updatedAt":"2026-07-06T19:24:38.327Z","severity":{"score":7.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H","source":"CISA-ADP"},"assigner":"CPANSec","products":["TONYC Imager"],"affected":[{"vendor":"TONYC","product":"Imager","packageName":"Imager","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"1.032","versionType":"custom"}],"collectionURL":"https://cpan.org/modules","programFiles":["SGI/imsgi.c"],"programRoutines":[{"name":"read_rgb_16_rle"}],"repo":"https://github.com/tonycoz/imager"}],"references":["https://github.com/tonycoz/imager/commit/f28de02770dfc26ffbdc32048970ed84babbf730.patch","https://metacpan.org/release/TONYC/Imager-1.032/source/Changes","http://www.openwall.com/lists/oss-security/2026/07/06/3"],"weaknesses":["CWE-125"],"ingestedAt":"2026-10-29T20:11:00.674Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/13xxx/CVE-2026-13705.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-13705","state":"PUBLISHED","datePublished":"2026-07-06T12:03:38.513Z","dateUpdated":"2026-07-06T19:24:38.327Z","assignerShortName":"CPANSec","assignerOrgId":"9b29abf9-4ab0-4765-b253-1875cd9b441e","dateReserved":"2026-06-29T13:21:04.275Z"},"containers":{"cna":{"title":"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","descriptions":[{"lang":"en","value":"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.\n\nread_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.\n\nReading a crafted SGI image through Imager->read triggers the over-read before the parser rejects the malformed image, which can crash the process."}],"affected":[{"vendor":"TONYC","product":"Imager","packageName":"Imager","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"1.032","versionType":"custom"}],"collectionURL":"https://cpan.org/modules","programFiles":["SGI/imsgi.c"],"programRoutines":[{"name":"read_rgb_16_rle"}],"repo":"https://github.com/tonycoz/imager"}],"references":[{"url":"https://github.com/tonycoz/imager/commit/f28de02770dfc26ffbdc32048970ed84babbf730.patch","tags":["patch"]},{"url":"https://metacpan.org/release/TONYC/Imager-1.032/source/Changes","tags":["release-notes"]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-125","description":"CWE-125 Out-of-bounds Read","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"CPANSec","orgId":"9b29abf9-4ab0-4765-b253-1875cd9b441e","dateUpdated":"2026-07-06T12:03:38.513Z"},"solutions":[{"lang":"en","value":"Upgrade to Imager 1.032 or later."}],"source":{"discovery":"UNKNOWN"},"timeline":[{"lang":"en","time":"2026-07-01T00:00:00.000Z","value":"Version 1.032 released with fix."}],"x_generator":{"engine":"cpansec-cna-tool 0.1"}},"adp":[{"title":"CVE Program Container","references":[{"url":"http://www.openwall.com/lists/oss-security/2026/07/06/3"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2026-07-06T18:38:12.676Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.1,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H","integrityImpact":"NONE","userInteraction":"REQUIRED","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"NONE","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"timestamp":"2026-07-06T19:24:34.960922Z","id":"CVE-2026-13705","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-07-06T19:24:38.327Z"}}]}}}