Skip to content
OpenAdvisories
High · 7.5 CVE-2026-13708 EUVD-2026-41873GHSA-cx44-fgg3-fcp4

Imager::File::JPEG versions before 1.003 for Perl leak heap memory when reading a JPEG with repeated APP13 markers in i_readjpeg_wiol

Published Jul 6, 2026 · Updated Jul 6, 2026 · Assigned by CPANSec

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

VendorProductAffectedFixed
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.

ReleasePackageFixed inAdvisory
Debian 14 libimager-perl 1.032+dfsg-1 —
Debian 13 libimager-perl No fix yet —
Debian 12 libimager-perl No fix yet —
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
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 —

References