CVE-2023-25434

8.8 HIGH

📋 TL;DR

A buffer overflow vulnerability in libtiff's tiffcrop utility allows attackers to execute arbitrary code or cause denial of service by processing specially crafted TIFF images. This affects any system using vulnerable versions of libtiff, particularly those that process untrusted TIFF files.

💻 Affected Systems

Products:
  • libtiff
  • any software using libtiff library
Versions: libtiff 4.5.0 specifically
Operating Systems: Linux, Windows, macOS, Unix-like systems
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability is in tiffcrop utility but affects any application using libtiff library with similar TIFF processing code paths.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution with the privileges of the application using libtiff, potentially leading to full system compromise.

🟠

Likely Case

Application crash (denial of service) when processing malicious TIFF files, with potential for limited code execution depending on memory protections.

🟢

If Mitigated

Application crash without code execution if ASLR/DEP/stack canaries are properly implemented and effective.

🌐 Internet-Facing: MEDIUM - Risk exists if applications process user-uploaded TIFF files, but requires specific TIFF processing functionality.
🏢 Internal Only: LOW - Typically requires local file processing or specific TIFF manipulation workflows.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Proof of concept demonstrates crash; weaponization for RCE would require bypassing modern memory protections.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: libtiff 4.5.1 and later

Vendor Advisory: https://gitlab.com/libtiff/libtiff/-/issues/519

Restart Required: No

Instructions:

1. Update libtiff to version 4.5.1 or later. 2. For Linux: Use package manager (apt-get update && apt-get upgrade libtiff5). 3. For Windows: Download updated version from libtiff website. 4. Recompile any applications statically linked to libtiff.

🔧 Temporary Workarounds

Disable tiffcrop utility

linux

Remove or restrict execution permissions for tiffcrop binary

sudo chmod 000 /usr/bin/tiffcrop
sudo mv /usr/bin/tiffcrop /usr/bin/tiffcrop.disabled

Input validation for TIFF files

all

Implement strict validation of TIFF file inputs before processing

🧯 If You Can't Patch

  • Implement strict file upload restrictions for TIFF files
  • Run vulnerable applications in sandboxed/containerized environments with minimal privileges

🔍 How to Verify

Check if Vulnerable:

Check libtiff version: tiffinfo -v | grep Version

Check Version:

tiffinfo -v | grep Version

Verify Fix Applied:

Verify version is 4.5.1 or later: tiffinfo -v | grep 'Version 4\.5\.[1-9]'

📡 Detection & Monitoring

Log Indicators:

  • Application crashes when processing TIFF files
  • Segmentation faults in libtiff-related processes

Network Indicators:

  • Unusual TIFF file uploads to web applications
  • TIFF processing from untrusted sources

SIEM Query:

process_name:tiffcrop AND (event_type:crash OR exit_code:139)

🔗 References

📤 Share & Export