Heap-based Buffer Overflow in LibTIFF t2p_write_pdf Function

tiff Updated 02 Oct 2025

Summary

13/12/2017
N/A
Yes i
Unrated
Not published

DLA-1206-1: tiff - security update. Affects tiff versions < 4.0.2-6+deb7u17. Fixed in 4.0.2-6+deb7u17. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The LibTIFF package is a library and set of tools for reading, writing, and manipulating TIFF (Tagged Image File Format) files. It provides support for various compression schemes, color spaces, and image types. The vulnerability affects version 4.0.8 of LibTIFF and specifically targets the t2p_write_pdf function in the tiff2pdf.c file. This function is responsible for converting TIFF documents to PDF format. The vulnerability arises from a heap-based buffer overflow, which can lead to several potential damages, including out-of-bounds reads, invalid frees, memory corruption, and double frees. Exploiting this vulnerability could potentially result in arbitrary code execution.

Vulnerability Detail

The heap-based buffer overflow in the t2p_write_pdf function is caused by an underlying assumption that all pages in a TIFF document will have the same transfer function. However, the TIFF standard does not require this to be the case. An attacker can craft a malicious TIFF document that triggers the overflow, leading to various consequences depending on the specific scenario. These consequences include out-of-bounds reads, invalid frees, memory corruption, and double frees. The most severe outcome is the potential for arbitrary code execution, allowing the attacker to gain control over the affected system.

How To Fix

Minimum fixed version

4.0.2-6+deb7u17

This is the first release that contains the fix.

sudo apt-get install --only-upgrade tiff

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround provided for this vulnerability. The recommended solution is to apply the available security update and upgrade to the fixed version of the tiff package.

Conclusion

In conclusion, the LibTIFF package is vulnerable to a heap-based buffer overflow in the t2p_write_pdf function. This vulnerability can have severe consequences, including arbitrary code execution. To mitigate the risk, it is crucial to upgrade to the fixed version of the tiff package. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for tiff →

Share this vulnerability

FAQ

LibTIFF is a library and set of tools for reading, writing, and manipulating TIFF files. It provides support for various compression schemes, color spaces, and image types.

The vulnerability can lead to out-of-bounds reads, invalid frees, memory corruption, and double frees. The most severe consequence is the potential for arbitrary code execution, allowing an attacker to take control of the affected system.

To fix this vulnerability, you should upgrade the tiff package to version 4.0.2-6+deb7u17 or later. This version includes the necessary patches to address the heap-based buffer overflow.

There is no specific workaround provided for this vulnerability. The recommended solution is to apply the available security update and upgrade to the fixed version of the tiff package.

You can find more information about Debian LTS security advisories, including how to apply updates and frequently asked questions, on the Debian LTS wiki: https://wiki.debian.org/LTS

Related vulnerabilities

Recent vulnerabilities recorded for tiff.

How To Fix

Minimum fixed version

4.0.2-6+deb7u17

This is the first release that contains the fix.

sudo apt-get install --only-upgrade tiff

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback