CVE-2026-13708: CWE-401 Missing Release of Memory after Effective Lifetime in TONYC Imager::File::JPEG
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.
AI Analysis
Technical Summary
CVE-2026-13708 is a memory leak vulnerability (CWE-401) in the Imager::File::JPEG Perl module before version 1.003. The vulnerability arises in the i_readjpeg_wiol function, which processes JPEG APP13 markers by allocating new buffers for each marker but failing to free previously allocated memory. Only the final payload is freed, causing the first N-1 payloads to leak for a JPEG with N APP13 markers. This leak accumulates in long-running processes, potentially leading to denial of service due to memory exhaustion. The same issue affects the bundled handler in the Imager distribution before version 1.032, which includes the fix.
Potential Impact
Repeated reading of JPEG files with multiple APP13 markers causes heap memory leaks, which accumulate over time in long-lived processes. This can exhaust available memory and result in denial of service conditions. There is no indication of code execution or data corruption, only resource exhaustion.
Mitigation Recommendations
A fix is available in Imager::File::JPEG version 1.003 and in the Imager distribution version 1.032. Users should upgrade to these versions or later to remediate the memory leak. No other mitigation or workaround is indicated.
CVE-2026-13708: CWE-401 Missing Release of Memory after Effective Lifetime in TONYC Imager::File::JPEG
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.
CVSS v3.1
Score 7.5high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-13708 is a memory leak vulnerability (CWE-401) in the Imager::File::JPEG Perl module before version 1.003. The vulnerability arises in the i_readjpeg_wiol function, which processes JPEG APP13 markers by allocating new buffers for each marker but failing to free previously allocated memory. Only the final payload is freed, causing the first N-1 payloads to leak for a JPEG with N APP13 markers. This leak accumulates in long-running processes, potentially leading to denial of service due to memory exhaustion. The same issue affects the bundled handler in the Imager distribution before version 1.032, which includes the fix.
Potential Impact
Repeated reading of JPEG files with multiple APP13 markers causes heap memory leaks, which accumulate over time in long-lived processes. This can exhaust available memory and result in denial of service conditions. There is no indication of code execution or data corruption, only resource exhaustion.
Mitigation Recommendations
A fix is available in Imager::File::JPEG version 1.003 and in the Imager distribution version 1.032. Users should upgrade to these versions or later to remediate the memory leak. No other mitigation or workaround is indicated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- CPANSec
- Date Reserved
- 2026-06-29T13:22:53.937Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a4ba8b227e9c797198d8144
Added to database: 07/06/2026, 13:08:02 UTC
Last enriched: 07/06/2026, 13:21:21 UTC
Last updated: 08/19/2026, 10:57:07 UTC
Views: 107
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.