CVE-2026-18495: Libtiff: libtiff: heap-buffer overflow via numeric truncation in the jpeg raw passthrough

Published Sep 10, 2026
·
Updated

A flaw was found in libtiff. A heap-buffer overflow vulnerability exists in the tiff2pdf utility due to an integer truncation error when processing crafted BigTIFF files. An attacker can provide a specially crafted BigTIFF file, causing a 64-bit StripByteCounts value to be truncated to a 32-bit integer. This leads to an undersized memory allocation and a subsequent out-of-bounds memory copy, resulting in a crash and severe memory corruption.

Other sources

An AddressSanitizer (ASan)-confirmed heap-buffer overflow exists in the tiff2pdf utility of libtiff (tested on version 4.5.0). The vulnerability is triggered during the processing of crafted BigTIFF files, leading to a massive out-of-bounds memory copy that causes a crash and presents a severe memory corruption risk.

Technical Details

The root cause is an integer truncation flaw located in the JPEG raw passthrough path within tools/tiff2pdf.c, specifically in the t2preadwritepdfimage() function.When parsing BigTIFF files, StripByteCounts values are correctly read as 64-bit unsigned integers (uint64t). However, the variable used to track the maximum strip length—maxstriplength—is declared as a 32-bit unsigned integer (uint32t). If an attacker provides a crafted BigTIFF file with a StripByteCounts value exceeding the 32-bit limit, the value is truncated upon assignment to maxstriplength.This truncation results in an undersized heap allocation. Subsequently, TIFFReadRawStrip(..., -1) attempts to copy the full 64-bit strip byte count into this inadequate buffer, resulting in a heap-based buffer overflow that can exceed 4GB.

Affected VersionsVulnerable:

libtiff versions 3.9.0 through 4.7.0.

Fixed: libtiff version 4.7.1.

Upstream Status and RemediationUpstream developers have addressed this issue in version 4.7.1 by changing the data type of maxstriplength from uint32t to uint64t.

Note for Downstream Maintainers: The upstream libtiff project policy focuses on maintaining the current source tree and issuing new releases rather than backporting patches to legacy versions.

Commit: https://gitlab.com/libtiff/libtiff/-/commit/67fd283d276f09db54dc39b9ef7b979d4b45c4b1Merge Request (!729): https://gitlab.com/libtiff/libtiff/-/mergerequests/729

Red Hat

Affected Software

2 affected components
LibTIFF libtiff>=3.9.0<=4.7.0
LibTIFF libtiff>4.7.0<4.7.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade libtiff to a version that resolves this vulnerability.

    Fixed in 4.7.1Patch 67fd283d276f09db54dc39b9ef7b979d4b45c4b1Merge
  2. Upgrade

    Upgrade libtiff to a version that resolves this vulnerability.

    Fixed in 4.7.1Patch 729

Event History

Sep 10, 2026
Data Sourced
via Red Hat·12:33 PM
DescriptionSeverityAffected Software
Sep 11, 2026
CVE Published
via MITRE·05:41 PM
Data Sourced
via MITRE·05:41 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are realistically exposed?

Deployments that run the tiff2pdf utility and process attacker-supplied BigTIFF files are exposed, particularly when the JPEG raw passthrough path is used. The issue is in the utility rather than being described as a general flaw in every libtiff use case.

2

What access does an attacker need to exploit this issue?

The supplied severity vector indicates local attack access, low privileges, and required user interaction. The attacker must get a specially crafted BigTIFF file processed by tiff2pdf.

3

What input characteristics should defensive filtering or review focus on?

The triggering condition involves a BigTIFF file with a 64-bit StripByteCounts value that cannot be safely represented in the 32-bit max_striplength variable. This truncation can cause an undersized allocation followed by a large out-of-bounds copy in the JPEG raw passthrough path.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203