rootpwn

critical · CVSS v3 9.8

CVE-2026-73638

The Imager library for Perl contains an out-of-bounds read vulnerability in its EXIF metadata parsing function, `tiff_load_ifd`. Due to impr

Overview

The Imager library for Perl contains an out-of-bounds read vulnerability in its EXIF metadata parsing function, `tiff_load_ifd`. Due to improper validation of start offsets and potential integer/type wrapping, the library fails to restrict reads within the intended EXIF data block. Any Perl application utilizing `Imager->read()` on untrusted image files is vulnerable to information leakage or application crashes.

Description

Imager versions from 0.45_02 before 1.035 for Perl read outside the EXIF block via unchecked start offsets in tiff_load_ifd. tiff_load_ifd() validates an IFD entry's data by checking that `entry->offset + entry->size` stays within the EXIF block, and never checks the start offset itself. Where that sum is not the real end of the data, the check passes with the entry starting outside the block. Through 1.032 `entry->offset` is a plain int, so on the usual two's-complement implementations an offset with the high bit set converts to negative and the sum can land back inside the block. From 1.033 the field is a size_t and the addition wraps only where size_t is 32 bits. The IFD's own start offset is checked the same way and wraps where unsigned long is 32 bits, which includes 64-bit Windows. Any caller of Imager->read() on an attacker-supplied image may receive EXIF tags holding bytes from outside the block, or crash the process.

Impact

This vulnerability impacts Confidentiality and Availability. An attacker providing a specially crafted image can cause the process to read memory outside the designated EXIF block, potentially exposing sensitive process data via returned EXIF tags or causing a denial-of-service crash. Any server or application processing untrusted user-uploaded images via this module is affected.

Remediation

Upgrade the Imager Perl module to version 1.035 or higher. As a temporary mitigation, validate and sanitize image files prior to processing, or restrict processing of untrusted TIFF and EXIF data where updates cannot be immediately applied.

Risk context

Assessed with a Critical severity (CVSS v3 9.8), this flaw poses a high risk to applications handling external image inputs due to the potential for remote exploitation without requiring authentication.

Affected products

  • Perl Imager module (0.45_02 before 1.035)

Scores

Severity
critical
CVSS v2
7.5
CVSS v3
9.8
CVSS v4
EPSS

CVE-2026-73638 Perl Imager Out-Of-Bounds Read EXIF Parsing Denial of Service Information Disclosure

← All CVEs