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

CVE-2024-27628

CVE-2024-27628 Buffer Overflow in Dcmtk
📅 PUBLISHED: 2024-06-28 00:00 UTC 🔄 UPDATED: 2026-10-02 19:27 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.73%
👁️
0.73% probability
18.4× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
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
8.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-27628 is a critical buffer overflow vulnerability discovered in DCMTK version 3.6.8, specifically within the EctEnhancedCT method component. This flaw allows an unauthenticated attacker to execute arbitrary code on a target system by sending a specially crafted DICOM file. The vulnerability resides in how the library handles Enhanced CT image data, leading to a heap-based buffer overflow. Given the widespread use of DCMTK in medical imaging software and PACS systems, this poses a significant risk to healthcare infrastructure. No public proof-of-concept or patch is currently available, making detection and mitigation crucial.

⚡ 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 (No official vector assigned by NVD)
  • Threat Level: Critical (Based on the nature of the vulnerability and potential impact)
  • Attack Vector (AV): Network (Likely)
  • Attack Complexity (AC): Low (Likely)
  • Privileges Required (PR): None (Likely)
  • User Interaction (UI): None (Likely)
  • Scope (S): Unchanged (Likely)
  • Confidentiality (C): High (Likely)
  • Integrity (I): High (Likely)
  • Availability (A): High (Likely)

The lack of an official CVSS vector from NVD is concerning. Based on the description of a buffer overflow leading to arbitrary code execution, the impact is severe. An attacker could gain full control of the DCMTK process, potentially compromising the entire medical imaging system.

Deep Dive & Mechanics

The vulnerability is a heap-based buffer overflow in the EctEnhancedCT method of DCMTK 3.6.8. This method is responsible for parsing and processing Enhanced CT (Computed Tomography) image objects within the DICOM standard.

Mechanism:

  1. Input: An attacker crafts a malicious DICOM file with a specially crafted Enhanced CT image data set.
  2. Parsing: The EctEnhancedCT method attempts to parse the data, likely allocating a buffer on the heap based on size fields within the DICOM file.
  3. Overflow: Due to improper bounds checking, the attacker can provide size values that cause the method to write data beyond the allocated heap buffer.
  4. Corruption: This overflow corrupts adjacent heap metadata or other data structures.
  5. Exploitation: By carefully controlling the overflow data, an attacker can overwrite function pointers or other critical data, leading to arbitrary code execution.

The specific trigger is within the processing of the Enhanced CT IOD (Information Object Definition). The vulnerability likely lies in the handling of multi-frame data or specific tags related to CT acquisition parameters.

Vulnerable vs. Patched Code

Since no official patch or patched version is available, a direct code comparison is not possible. However, the vulnerable code is likely in the dcmdata or dcmimage library, specifically in the module handling Enhanced CT objects.

Vulnerable Code (Hypothetical):

// Hypothetical vulnerable code in DCMTK 3.6.8
void EctEnhancedCT::parseData(DcmItem &dataset) {
    Uint32 numFrames;
    dataset.findAndGetUint32(DCM_NumberOfFrames, numFrames);
    Uint8 *buffer = new Uint8[numFrames * FRAME_SIZE]; // Vulnerable allocation
    for (Uint32 i = 0; i < numFrames; i++) {
        // Read frame data directly into buffer without checking bounds
        dataset.findAndGetOFArray(DCM_PixelData, buffer + (i * FRAME_SIZE), numFrames * FRAME_SIZE);
    }
}

Patched Code (Hypothetical):

// Hypothetical patched code
void EctEnhancedCT::parseData(DcmItem &dataset) {
    Uint32 numFrames;
    dataset.findAndGetUint32(DCM_NumberOfFrames, numFrames);
    // Add validation
    if (numFrames > MAX_FRAMES) {
        // Handle error
        return;
    }
    Uint8 *buffer = new Uint8[numFrames * FRAME_SIZE];
    for (Uint32 i = 0; i < numFrames; i++) {
        // Add bounds checking
        if ((i * FRAME_SIZE) + FRAME_SIZE > numFrames * FRAME_SIZE) {
            // Handle error
            break;
        }
        dataset.findAndGetOFArray(DCM_PixelData, buffer + (i * FRAME_SIZE), FRAME_SIZE);
    }
}

The fix would involve adding proper validation of the NumberOfFrames value and ensuring that all subsequent memory operations are within the allocated buffer bounds.

Exploitation & Lab Setup

Red Team (Exploitation)

Lab Setup:

  1. Target: A virtual machine running a Linux distribution (e.g., Ubuntu 22.04) with DCMTK 3.6.8 installed.
  2. Tool: A Python script to generate the malicious DICOM file.
  3. Delivery: The malicious file can be delivered via email, a web application upload, or directly to a DICOM listener.

Exploitation Steps:

  1. Craft Payload: Create a Python script that generates a DICOM file with a crafted Enhanced CT dataset. The script will manipulate the NumberOfFrames tag and the PixelData tag to trigger the overflow.
  2. Trigger: Send the malicious DICOM file to the target application (e.g., dcm2pnm, dcmj2pnm, or a custom application using DCMTK).
  3. Gain Code Execution: The overflow will overwrite a function pointer with the address of a shellcode or ROP chain, leading to arbitrary code execution.

Example Python Payload Generator (Conceptual):

import pydicom
from pydicom.dataset import Dataset, FileDataset
from pydicom.uid import ExplicitVRLittleEndian

# Create a malicious DICOM file
ds = Dataset()
ds.SOPClassUID = '1.2.840.10008.5.1.4.1.1.2'  # Enhanced CT Image Storage
ds.SOPInstanceUID = '1.2.3.4.5.6.7.8.9'
ds.NumberOfFrames = 0xFFFFFFFF  # Trigger overflow
# ... other required tags ...
# Craft PixelData to overflow
ds.PixelData = b'A' * 0x1000  # Overflow data
# Save
ds.save_as('malicious.dcm', write_like_original=False)

Blue Team (Defense)

Detection:

  1. Monitor DICOM Traffic: Analyze incoming DICOM files for anomalies, such as excessively large NumberOfFrames values or malformed data sets.
  2. File Integrity Monitoring: Monitor for the creation of suspicious DICOM files in shared directories.
  3. Process Monitoring: Monitor DCMTK processes for crashes or unusual memory access patterns.

Mitigation:

  1. Input Validation: Implement strict validation of all DICOM file attributes before processing.
  2. Sandboxing: Run DCMTK processes in a sandboxed environment with limited privileges.
  3. Network Segmentation: Isolate PACS and medical imaging systems from the general network.
  4. Update: Apply patches as soon as they become available from DCMTK.

Indicators of Compromise (IOCs)

  • File Hashes (Malicious DICOM):
    • SHA256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 (Example - replace with actual)
  • Network Indicators:
    • Unusual DICOM traffic on port 11112 (default DICOM port) with abnormally large packets.
  • Process Indicators:
    • DCMTK processes (e.g., dcm2pnm, dcmj2pnm) crashing with segmentation faults.
    • High memory usage by DCMTK processes.
  • File System Indicators:
    • Creation of DICOM files with NumberOfFrames tag set to values greater than 1000 (or other abnormally high values).
    • Temporary files with unusual names in /tmp or application data directories.

Detection Engineering

YARA Rule

rule CVE_2024_27628_DCMTK_Overflow {
    meta:
        description = "Detects malicious DICOM files targeting CVE-2024-27628"
        author = "Valters IT"
        date = "2024-10-27"
        reference = "CVE-2024-27628"
    strings:
        $sop_class = "1.2.840.10008.5.1.4.1.1.2"  // Enhanced CT IOD
        $number_frames = { 28 00 00 00 }  // Tag for NumberOfFrames (0028,0008)
        $pixel_data = { 7F E0 00 10 }  // Tag for PixelData (7FE0,0010)
    condition:
        $sop_class and $number_frames and $pixel_data and
        // Check for abnormally large NumberOfFrames value
        uint32be(@number_frames + 8) > 1000
}

Sigma Rule

title: Suspicious DCMTK Process Crash or High Memory Usage
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects potential exploitation of CVE-2024-27628 via process anomalies
author: Valters IT
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith:
            - '\dcm2pnm.exe'
            - '\dcmj2pnm.exe'
            - '\dcmconv.exe'
        CommandLine|contains: 'malicious.dcm'
    condition: selection
falsepositives:
    - Legitimate processing of large DICOM files
level: high

Suricata Rule

alert tcp any any -> any 11112 (msg:"CVE-2024-27628 DCMTK Buffer Overflow Attempt"; flow:to_server,established; content:"|02 00 00 00|"; depth:4; content:"|28 00 00 00|"; distance:4; within:4; content:"|7F E0 00 10|"; distance:4; within:4; byte_test:4,>,1000,0,relative; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate Action:

    • Isolate systems running DCMTK 3.6.8 from untrusted networks.
    • Implement strict input validation for all DICOM files, especially those containing Enhanced CT data.
    • Monitor for any suspicious activity related to DCMTK processes.
  2. Long-Term Fix:

    • Await an official patch from the DCMTK project. Monitor the DCMTK website and mailing lists for updates.
    • Consider upgrading to a newer version of DCMTK if available, or apply any workarounds provided by the vendor.
    • Implement a Web Application Firewall (WAF) or Intrusion Prevention System (IPS) with rules to detect and block malicious DICOM files.
  3. Compensating Controls:

    • Run DCMTK applications in a sandboxed environment with minimal privileges.
    • Use network segmentation to limit access to PACS and medical imaging systems.
    • Enable detailed logging and auditing for all DCMTK operations.

Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert

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