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

CVE-2024-28576

CVE-2024-28576 Buffer Overflow in Freeimage
📅 PUBLISHED: 2024-03-20 00:00 UTC 🔄 UPDATED: 2026-09-23 20:29 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.28%
👁️
0.28% probability
7.0× 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
5.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-28576 is a buffer overflow vulnerability in the open-source FreeImage library, version 3.19.0 (r1909). The flaw resides in the opj_j2k_tcp_destroy() function, which is part of the JPEG 2000 (J2K) image decoding pipeline. A local attacker can exploit this vulnerability by crafting a malicious J2K image file, leading to a denial of service (DoS) condition. The vulnerability is currently unpatched, and no public exploit code or proof-of-concept is available. The EPSS score is 0.0%, indicating a low probability of exploitation in the wild at this time.

⚡ 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

The CVSS score is listed as 0.0, which is unusual and likely indicates that a full CVSS vector has not been assigned by NVD. Based on the description (local attacker, DoS), a reasonable estimate would be:

  • Attack Vector (AV): Local (L)
  • Attack Complexity (AC): Low (L)
  • Privileges Required (PR): None (N)
  • User Interaction (UI): Required (R) – victim must open the file
  • Scope (S): Unchanged (U)
  • Confidentiality (C): None (N)
  • Integrity (I): None (N)
  • Availability (A): High (H)

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 attack vector and DoS impact only)

Deep Dive & Mechanics

The vulnerability is a classic heap-based buffer overflow in the JPEG 2000 decoder component of FreeImage. The opj_j2k_tcp_destroy() function is responsible for cleaning up tile-part data structures (tcp). When parsing a malformed J2K image, the function may attempt to free or access memory outside the bounds of an allocated buffer, leading to a crash.

The root cause is likely an integer overflow or missing bounds check when calculating the size of a tile-part data buffer. When the image header contains manipulated tile dimensions or component counts, the allocation size becomes smaller than expected, and subsequent writes overflow the buffer.

The attack surface is limited to local file processing. An attacker must convince a user to open a specially crafted J2K file using an application that relies on FreeImage (e.g., image viewers, editors, or conversion tools).

Vulnerable vs. Patched Code

Vulnerable Code (FreeImage 3.19.0 r1909): The vulnerable function opj_j2k_tcp_destroy() in src/j2k/j2k.c likely contains a loop that frees tile-part data without proper bounds checking.

// Simplified vulnerable pattern
void opj_j2k_tcp_destroy(opj_tcp_t *tcp) {
    for (int i = 0; i < tcp->numtiles; i++) {
        // No check if tcp->tiles[i] is valid
        free(tcp->tiles[i]->data);
    }
}

Patched Code (Hypothetical): A fix would add bounds checking and validate the tile count before accessing the array.

// Patched version
void opj_j2k_tcp_destroy(opj_tcp_t *tcp) {
    if (tcp->numtiles > MAX_TILES) {
        // Handle error
        return;
    }
    for (int i = 0; i < tcp->numtiles; i++) {
        if (tcp->tiles[i] != NULL) {
            free(tcp->tiles[i]->data);
        }
    }
}

Exploitation & Lab Setup

Red Team

Objective: Trigger a denial of service by crafting a malicious J2K file.

Lab Setup:

  1. Install FreeImage 3.19.0 (r1909) on a test system.
  2. Use a hex editor or a fuzzer (e.g., AFL++) to modify a valid J2K file.
  3. Manipulate the tile-part header fields (e.g., SIZ marker segment) to cause an integer overflow.
  4. Open the crafted file with a FreeImage-based application (e.g., FreeImage_Load).

Example Crafting (Python):

import struct

def craft_malicious_j2k():
    # Minimal J2K header with overflow trigger
    # This is a simplified example; actual exploitation requires deep knowledge of J2K format
    data = b'\x00\x00\x00\x0c'  # J2K signature
    data += b'\x51\x51\x51\x51'  # SIZ marker (manipulated)
    # ... additional crafted data
    with open('exploit.j2k', 'wb') as f:
        f.write(data)

craft_malicious_j2k()

Expected Outcome: The application crashes due to a segmentation fault or access violation.

Blue Team

Detection:

  • Monitor for crashes in applications using FreeImage (e.g., event ID 1000 in Windows).
  • Use file integrity monitoring to detect unusual J2K files.
  • Implement application whitelisting to prevent untrusted image processing.

Mitigation:

  • Disable automatic image processing of J2K files if not required.
  • Use a sandboxed environment for image conversion tasks.
  • Apply memory protection mechanisms (ASLR, DEP).

Indicators of Compromise (IOCs)

  • File Hashes (SHA256): (None available – no public PoC)
  • File Names: *.j2k, *.jp2, *.jpc (malicious variants)
  • Process Behavior: Crash in FreeImage.dll or libfreeimage.so with access violation at opj_j2k_tcp_destroy
  • Network: None (local file-based attack)

Detection Engineering

YARA Rule

rule CVE_2024_28576_FreeImage_J2K_Overflow {
    meta:
        description = "Detects malicious J2K files targeting CVE-2024-28576"
        author = "Valters IT"
        date = "2024-01-01"
        reference = "CVE-2024-28576"
    strings:
        $j2k_magic = { 00 00 00 0C 51 51 51 51 }  // Example magic bytes
        $siz_marker = { FF 51 }  // SIZ marker
    condition:
        $j2k_magic at 0 and $siz_marker
}

Sigma Rule

title: FreeImage J2K Buffer Overflow Detection
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects crashes in applications using FreeImage when processing J2K files
author: Valters IT
logsource:
    category: application
    product: windows
    service: application
detection:
    selection:
        EventID: 1000
        ApplicationName: '*FreeImage*'
        FaultingModule: '*FreeImage.dll*'
    condition: selection
falsepositives:
    - Legitimate crashes due to corrupted files
level: medium

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-28576 FreeImage J2K File Download"; flow:to_client,established; filemagic:"J2K"; content:"|00 00 00 0C|"; distance:0; within:4; classtype:attempted-dos; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Patch Status: No official patch is available. Monitor the FreeImage project for updates.
  2. Workaround: Disable J2K support in applications using FreeImage, or use an alternative library (e.g., OpenJPEG).
  3. User Awareness: Educate users not to open J2K files from untrusted sources.
  4. Network Controls: Block J2K file downloads at the perimeter if not business-required.
  5. Application Hardening: Run image processing in a sandboxed environment with limited privileges.

Valters IT
Securing Digital Frontiers

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-28576/ · 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.