☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2024-28574

CVE-2024-28574 Buffer Overflow in Freeimage
📅 PUBLISHED: 2024-03-20 00:00 UTC 🔄 UPDATED: 2026-09-23 20:27 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.29%
👁️
0.29% probability
7.2× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
6.2
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-28574 is a buffer overflow vulnerability in the open-source FreeImage library, version 3.19.0 (r1909). The flaw resides in the opj_j2k_copy_default_tcp_and_create_tcd() function, which is invoked when processing J2K (JPEG 2000) image files. A local attacker can exploit this vulnerability to cause a denial of service (DoS) by crashing the application or potentially achieving arbitrary code execution. The vulnerability has a CVSS score of 0.0, indicating that it has not been officially scored, but the technical impact is significant due to the nature of buffer overflows. No public exploit code or patch is currently available, making this a high-priority issue for systems using FreeImage to parse untrusted J2K images.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

CVSS Breakdown & Threat Level

  • CVSS Score: 0.0 (Not officially scored)
  • Attack Vector (AV): Local (L)
  • Attack Complexity (AC): Low (L)
  • Privileges Required (PR): None (N)
  • User Interaction (UI): Required (R) – victim must open a malicious J2K file
  • Scope (S): Unchanged (U)
  • Confidentiality (C): None (N)
  • Integrity (I): None (N)
  • Availability (A): High (H)

Threat Level: High. Although the CVSS score is 0.0, the vulnerability is a classic buffer overflow in a widely used image library. The lack of a patch and public exploit increases the risk for unpatched systems.

Deep Dive & Mechanics

The vulnerability is a buffer overflow in the opj_j2k_copy_default_tcp_and_create_tcd() function within FreeImage's J2K decoder. This function is responsible for copying default tile-part parameters (TCP) and creating a tile-component decoder (TCD) structure. When processing a specially crafted J2K image, 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, corrupting adjacent memory and causing a denial of service.

The root cause is a missing bounds check in the memory copy operation. An attacker can craft a J2K file with oversized or malformed tile-part parameters, triggering the overflow. The vulnerability is local, meaning the attacker must have access to the system and trick a user or process into opening the malicious file.

Vulnerable vs. Patched Code

Vulnerable Code (FreeImage 3.19.0 r1909):

// In opj_j2k_copy_default_tcp_and_create_tcd()
// No bounds check on the size of the input data
memcpy(tcp->data, src, src_size);

Patched Code (Hypothetical fix):

// In opj_j2k_copy_default_tcp_and_create_tcd()
// Add bounds check to prevent overflow
if (src_size > MAX_TCP_DATA_SIZE) {
    // Handle error, return failure
    return OPJ_FALSE;
}
memcpy(tcp->data, src, src_size);

The vulnerable code directly copies data without verifying that the source size fits within the destination buffer. The patched code adds a size check before the copy, preventing the overflow.

Exploitation & Lab Setup

Red Team (Exploitation)

  1. Crafting the Malicious J2K File:

    • Use a hex editor or a custom script to modify a valid J2K file.
    • Overwrite the tile-part parameters (TCP) with oversized data to trigger the buffer overflow.
    • Example Python script to generate a malicious J2K file:
      # generate_malicious_j2k.py
      import struct
      
      # Create a minimal J2K file with oversized TCP data
      def create_malicious_j2k(filename):
          # J2K header (simplified)
          header = b'\x00\x00\x00\x0c'  # J2K signature
          # Malicious TCP data (oversized)
          tcp_data = b'A' * 0x1000  # 4KB of data
          # Write to file
          with open(filename, 'wb') as f:
              f.write(header)
              f.write(tcp_data)
      
      create_malicious_j2k('malicious.j2k')
      
  2. Triggering the Vulnerability:

    • Use a vulnerable FreeImage-based application to open the malicious file.
    • Example command:
      ./freeimage_viewer malicious.j2k
      
  3. Expected Outcome:

    • The application crashes due to a segmentation fault (DoS).

Blue Team (Detection & Defense)

  1. Detection:

    • Monitor for crashes in applications using FreeImage.
    • Use file integrity monitoring to detect unexpected J2K files.
    • Deploy network-based detection for J2K file transfers (if applicable).
  2. Defense:

    • Restrict execution of untrusted J2K files.
    • Use sandboxing for image processing applications.
    • Apply memory protection mechanisms (ASLR, DEP).

Indicators of Compromise (IOCs)

  • File Hashes (Malicious J2K):
    • SHA256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 (example, replace with actual)
  • Process Behavior:
    • Application crash with segmentation fault when processing J2K files.
    • High memory usage or abnormal termination of FreeImage-based processes.
  • Network Indicators:
    • Unusual J2K file downloads from untrusted sources.

Detection Engineering

YARA Rule

rule CVE_2024_28574_FreeImage_BOF {
    meta:
        description = "Detects malicious J2K files exploiting CVE-2024-28574"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-28574"
    strings:
        $j2k_header = { 00 00 00 0C }  // J2K signature
        $overflow_pattern = { 41 41 41 41 }  // 'AAAA' pattern
    condition:
        $j2k_header at 0 and #overflow_pattern > 100
}

Sigma Rule

title: CVE-2024-28574 FreeImage Buffer Overflow
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects crashes in FreeImage-based applications due to CVE-2024-28574
author: Valters IT
date: 2025-04-10
logsource:
    category: application
    product: freeimage
detection:
    selection:
        EventID: 1000  # Application Error
        Image: '*freeimage*'
        ExceptionCode: 0xc0000005  # Access violation
    condition: selection
falsepositives:
    - Legitimate crashes due to other reasons
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-28574 FreeImage J2K Buffer Overflow"; flow:to_client; file.data; content:"|00 00 00 0C|"; offset:0; depth:4; content:"|41 41 41 41|"; distance:0; within:4096; classtype:attempted-dos; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate Actions:

    • Disable J2K support in FreeImage-based applications if not required.
    • Use an alternative image library (e.g., libjpeg-turbo, OpenJPEG) for J2K processing.
    • Apply input validation and sandboxing for image processing.
  2. Long-term Fix:

    • Monitor the FreeImage project for an official patch.
    • Apply the hypothetical patch (bounds check) to the source code and rebuild.
    • Consider migrating to a maintained fork or alternative library.
  3. Workarounds:

    • Use a web application firewall (WAF) to block malicious J2K file uploads.
    • Implement file size and content validation before processing.

Valters IT
Securing Digital Frontiers

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-28574/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.