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.
{
"cna_assigner": "CPANSec",
"cwe_ids": [
"CWE-401"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/13xxx/CVE-2026-13708.json"
}{
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "1.003"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
},
{
"range": [
{
"fixed": "9f1c485ca3ee15dc261549e11afb356866552c3a"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-13708.json"
[
{
"deprecated": false,
"digest": {
"function_hash": "137080071638772053809920404787996193832",
"length": 4970
},
"id": "CVE-2026-13708-0087428d",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/tonycoz/imager/commit/9f1c485ca3ee15dc261549e11afb356866552c3a",
"target": {
"file": "JPEG/imjpeg.c",
"function": "i_readjpeg_wiol"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"230127267846393634861762627328607291268",
"71238655923091604572747434552057704337",
"65307499942038724189000705390293708952",
"311148818155570753347703676308839364101"
],
"threshold": 0.9
},
"id": "CVE-2026-13708-6db8df87",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/tonycoz/imager/commit/9f1c485ca3ee15dc261549e11afb356866552c3a",
"target": {
"file": "JPEG/imjpeg.c"
}
}
]
"2026-10-28T11:07:32Z"