Imager versions before 1.036 for Perl exit the process reading a TGA with a colour map length of 32768 or more in tga_palette_read
Imager versions before 1.036 for Perl exit the process reading a TGA with a colour map length of 32768 or more in tga_palette_read. The reader unpacks the two-byte colour map length into a signed short, so a length of 32768 or more becomes negative. tga_palette_read() casts that value to size_t and asks mymalloc() for a size near SIZE_MAX. The allocation fails and Imager's allocator calls exit(3). Reading an attacker-supplied file through Imager->read() triggers an uncatchable exit.
First public PoC
None yetno public PoC found
Public PoCs00 on GitHub
CVSS9.1critical · scored by CISA ADP · CWE-196
CISA KEV
Not listednot known exploited
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 1.036
Fixed in 1.036
Mitigation
Upgrade to Imager 1.036 or later.
References
- Vendor advisory github.com/tonycoz/imager/security/advisories/…
- Patch github.com/tonycoz/imager/commit/74ed50e0625f9…
- Release notes metacpan.org/release/TONYC/Imager-1.036/changes
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.