CVE-2026-13705
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
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.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
7.1
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
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.
- Record
CVE-2026-13705- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H - Weakness
- CWE-125
- Updated
- 2026-11-02
EUVDEUVD-2026-41872
7.1
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.
- Record
EUVD-2026-41872- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-pmgh-mrwc-qw67
7.1
Imager versions before 1.032 for Perl have a heap out-of-bounds read in the bundled Imager::File:...
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.
- Record
GHSA-pmgh-mrwc-qw67- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H - Weakness
- CWE-125
- Updated
- 2026-11-02
NVD
7.1
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.
- Record
CVE-2026-13705- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H - Weakness
- CWE-125
- Updated
- 2026-11-02
OSV
7.1
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
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.
- Record
CVE-2026-13705- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H - Weakness
- CWE-125
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-13705
7.1
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.
- Record
DEBIAN-CVE-2026-13705- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-13705
7.1
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.
- Record
UBUNTU-CVE-2026-13705- CVSS 3.1
- 7.1 High
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSVMGASA-2026-0284 No score
Updated perl-Imager package fixes security vulnerabilities
The updated package fixes security vulnerabilities: The Imager package before 1.025 for Perl has a heap-based buffer overflow leading to denial of service, or possibly unspecified other impact, when the trim() method is called on a crafted input image. (CVE-2024-53901) 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. (CVE-2026-13705) Imager::File::JPEG versions before 1.003 for Perl leak heap memory when reading a JPEG with repeated APP13 markers in i_readjpeg_wiol. (CVE-2026-13708) Imager versions before 1.033 for Perl treat unsigned EXIF IFD entry counts as signed. (CVE-2026-14454)
- Record
MGASA-2026-0284- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
libimager-perlDebian:12 |
All versions, plus listed versions 1.019+dfsg-11.019+dfsg-21.020+dfsg-11.022+dfsg-11.023+dfsg-1 Show 17 moreShow less1.024+dfsg-11.024+dfsg-21.025+dfsg-11.027+dfsg-11.028+dfsg-11.029+dfsg-11.030+dfsg-11.031+dfsg-11.032+dfsg-11.033+dfsg-11.034+dfsg-11.034+dfsg-21.035+dfsg-11.036+dfsg-11.037+dfsg-11.037+dfsg-21.040+dfsg-1 |
None known |
libimager-perlDebian:13 |
All versions, plus listed versions 1.027+dfsg-11.028+dfsg-11.029+dfsg-11.030+dfsg-11.031+dfsg-1 Show 9 moreShow less1.032+dfsg-11.033+dfsg-11.034+dfsg-11.034+dfsg-21.035+dfsg-11.036+dfsg-11.037+dfsg-11.037+dfsg-21.040+dfsg-1 |
None known |
libimager-perlDebian:14 |
before 1.032+dfsg-1, plus listed versions 1.027+dfsg-11.028+dfsg-11.029+dfsg-11.030+dfsg-11.031+dfsg-1 |
1.032+dfsg-1 |
perl-ImagerMageia:10 From an advisory covering 4 CVEs |
before 1.33.0-1.mga10 | 1.33.0-1.mga10 |
perl-ImagerMageia:9 From an advisory covering 4 CVEs |
before 1.19.0-2.2.mga9 | 1.19.0-2.2.mga9 |
libimager-perlUbuntu:16.04:LTS |
All versions, plus listed versions 1.003+dfsg-11.004+dfsg-11.004+dfsg-1build1 |
None known |
libimager-perlUbuntu:18.04:LTS |
All versions, plus listed versions 1.005+dfsg-2build11.006+dfsg-1 |
None known |
libimager-perlUbuntu:20.04:LTS |
All versions, plus listed versions 1.011+dfsg-11.011+dfsg-1build1 |
None known |
libimager-perlUbuntu:22.04:LTS |
All versions, plus listed versions 1.012+dfsg-1build11.012+dfsg-21.012+dfsg-2build1 |
None known |
libimager-perlUbuntu:24.04:LTS |
All versions, plus listed versions 1.019+dfsg-21.020+dfsg-11.022+dfsg-11.023+dfsg-11.023+dfsg-1build11.023+dfsg-1build2 |
None known |
libimager-perlUbuntu:25.10 |
All versions, plus listed versions 1.027+dfsg-1 |
None known |
libimager-perlUbuntu:26.10 |
All versions, plus listed versions 1.029+dfsg-11.031+dfsg-11.033+dfsg-11.035+dfsg-1 |
None known |
libimager-perlUbuntu:26.04:LTS |
All versions, plus listed versions 1.027+dfsg-11.029+dfsg-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-13705 is a high vulnerability (CVSS 7.1) in Tonyc Imager, published July 6, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.18%, the 6th percentile. Fixed in libimager-perl 1.032+dfsg-1.
References
github.com/tonycoz/imager/commit/f28de02770dfc26ffbdc32048970ed84babbf730.patch
metacpan.org/release/TONYC/Imager-1.032/source/Changes
openwall.com/lists/oss-security/2026/07/06/3
nvd.nist.gov/vuln/detail/CVE-2026-13705
github.com/advisories/GHSA-pmgh-mrwc-qw67
cpan.org/modules
Show 12 moreShow less
github.com/CVEProject/cvelistV5/tree/main/cves/2026/13xxx/CVE-2026-13705.json
github.com/tonycoz/imager
security-tracker.debian.org/tracker/CVE-2026-13705
advisories.mageia.org/MGASA-2026-0284.html
bugs.mageia.org/show_bug.cgi?id=35848
lists.fedoraproject.org/archives/list/[email protected]/message/7QJU7MFFAP73YEH5YEG35EDMGSNOZ3O5
openwall.com/lists/oss-security/2026/07/08/6
lists.security.metacpan.org/cve-announce/msg/41572386
lists.security.metacpan.org/cve-announce/msg/41637674
github.com/briandfoy/cpan-security-advisory/issues/167
ubuntu.com/security/CVE-2026-13705
cve.org/CVERecord?id=CVE-2026-13705