Description
Imager::File::JPEG versions before 1.003 for Perl leak heap memory when reading a JPEG with repeated APP13 markers in i_readjpeg_wiol.
i_readjpeg_wiol walks the marker list libjpeg returns and, for each APP13 marker, allocates a new buffer with *iptc_itext = mymalloc(...) and overwrites the previous pointer without freeing it. Only the final payload is later turned into a Perl scalar and freed, so a JPEG with N such markers leaks the first N-1 payloads on every read.
In a long-lived process, such as an upload or thumbnailing service, repeated reads accumulate these leaks and exhaust available memory, a denial of service.
The same handler ships bundled in the Imager distribution, where versions before 1.032 are affected and the fix ships in 1.032.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| TONYC | Imager::File::JPEG | < 1.003 | 1.003 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | libimager-perl | 1.032+dfsg-1 | — |
| Debian 13 | libimager-perl | No fix yet | — |
| Debian 12 | libimager-perl | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | libimager-perl | No fix yet | — |
| Ubuntu 26.04 LTS | libimager-perl | No fix yet | — |
| Ubuntu 25.10 | libimager-perl | No fix yet | — |
| Ubuntu 24.04 LTS | libimager-perl | No fix yet | — |
| Ubuntu 22.04 LTS | libimager-perl | No fix yet | — |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | libimager-perl | No fix yet | — |
| Ubuntu 18.04 LTS | libimager-perl | No fix yet | — |
| Ubuntu 16.04 LTS | libimager-perl | No fix yet | — |