Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-97059 Overview
CVE-2026-97059 is a heap over-read vulnerability in the DICOM Toolkit (DCMTK) through version 3.7.0. The flaw resides in the ConcatenationLoader component, which copies pixel data frames without validating the PixelData buffer length against the declared NumberOfFrames value. Attackers can craft malicious DICOM instances that declare more frames than the underlying buffer actually contains. Parsing such a file triggers a heap over-read that can crash the application or leak adjacent heap memory. The weakness is categorized as CWE-125 (Out-of-Bounds Read) and is reachable over the network via any DICOM ingestion workflow.
Critical Impact
Remote attackers can crash DICOM parsing processes or disclose adjacent heap memory by submitting crafted DICOM instances with inflated NumberOfFrames values.
Affected Products
- DCMTK versions up to and including 3.7.0
- dcmfg module component ConcatenationLoader (dcmfg/libsrc/concatenationloader.cc)
- dcmiod utility function DcmIODUtil::extractBinaryFrames (dcmiod/include/dcmtk/dcmiod/iodutil.h)
Discovery Timeline
- 2026-09-24 - CVE-2026-97059 published to NVD
- 2026-09-30 - Last updated in NVD database
Technical Details for CVE-2026-97059
Vulnerability Analysis
DCMTK is a widely deployed open-source toolkit used by medical imaging software and PACS (Picture Archiving and Communication Systems) to parse DICOM files. The ConcatenationLoader class reassembles multi-frame DICOM concatenations from source instances. During reassembly, it reads the NumberOfFrames attribute from the DICOM header and uses that value to iterate over the PixelData buffer. The parser does not verify that the buffer actually contains enough bytes to satisfy the declared frame count. When NumberOfFrames is set higher than the buffer can support, the extraction logic reads memory past the end of the pixel data allocation.
Root Cause
The root cause is missing length validation in ConcatenationLoader::extractFrames and DcmIODUtil::extractBinaryFrames. For binary (1-bit) frame data, the required buffer size equals Rows * Cols * NumberOfFrames bits rounded up to whole bytes. The vulnerable code path called extractBinaryFrames directly without computing this required size or comparing it to pixDataElem->getLengthField(). Any mismatch between the declared frame count and the actual pixel data length resulted in an out-of-bounds read on the heap.
Attack Vector
Exploitation requires an attacker to deliver a crafted DICOM instance to a DCMTK-based parser. Delivery paths include DICOM C-STORE requests to a networked PACS, DICOMweb (STOW-RS) uploads, or file ingestion by desktop viewers. No authentication or user interaction is required beyond normal file processing. Successful exploitation produces process crashes (denial of service) or leakage of adjacent heap memory, which may contain other patient data or sensitive application state.
// Patch excerpt: validate buffer length before extracting binary frames
result = pixDataElem->getUint8Array(pixData);
if (result.good() && pixData)
{
// Make sure the Pixel Data element actually contains enough bytes for the
// announced number of (1-bit) frames, otherwise extractBinaryFrames() would
// read past the end of the buffer (heap over-read).
size_t totalBits = 0;
OFBool ok = OFStandard::safeMult(
OFstatic_cast(size_t, info.m_Rows),
OFstatic_cast(size_t, info.m_Cols), totalBits);
if (ok)
ok = OFStandard::safeMult(totalBits,
OFstatic_cast(size_t, numFrames), totalBits);
if (!ok)
{
DCMFG_ERROR("Cannot compute Pixel Data size for "
<< numFrames << " frames (value too large)");
return FG_EC_PixelDataDimensionsInvalid;
}
size_t bytesRequired = totalBits / 8;
if (totalBits % 8 != 0)
bytesRequired++;
if (bytesRequired > OFstatic_cast(size_t, pixDataElem->getLengthField()))
{
DCMFG_ERROR("Pixel Data too short: "
<< pixDataElem->getLengthField() << " bytes present but "
<< bytesRequired << " bytes required for "
<< numFrames << " frames");
return FG_EC_PixelDataDimensionsInvalid;
}
}
Source: DCMTK Commit c337908
Detection Methods for CVE-2026-97059
Indicators of Compromise
- Unexpected crashes, SIGSEGV, or AddressSanitizer heap-buffer-overflow reports in processes linking against libdcmfg or libdcmiod.
- DICOM instances where NumberOfFrames multiplied by the frame size exceeds the actual PixelData element length reported by getLengthField().
- DICOM uploads originating from unexpected source Application Entity (AE) titles or external IP ranges targeting DICOM listener ports (default 104, 11112).
Detection Strategies
- Parse incoming DICOM files with a validation preprocessor that compares NumberOfFrames * Rows * Cols against the PixelData buffer length and quarantines mismatches.
- Enable AddressSanitizer or Valgrind in test environments to catch heap over-reads during fuzzing of DICOM parsers.
- Monitor process telemetry for abnormal termination of imaging services such as storescp, dcmqrscp, or custom integrations using DCMTK.
Monitoring Recommendations
- Log all DICOM C-STORE and STOW-RS transactions with source AE title, calling IP, and SOP Class UID for forensic review.
- Alert on repeated parser crashes from the same client, which may indicate exploitation attempts or memory disclosure probing.
- Track outbound network traffic from imaging hosts to detect post-exploitation data exfiltration following potential heap memory leaks.
How to Mitigate CVE-2026-97059
Immediate Actions Required
- Upgrade DCMTK to a version containing commits 18379d5 and c337908, which add buffer length validation in ConcatenationLoader and extractBinaryFrames.
- Inventory all applications and medical imaging appliances statically or dynamically linked against DCMTK 3.7.0 or earlier.
- Restrict DICOM listener exposure to trusted network segments and authenticated peers only.
Patch Information
The vendor fix is split across two upstream commits in the DCMTK repository. Commit 18379d5 addresses concatenationloader.cc, and commit c337908 adds length validation inside DcmIODUtil::extractBinaryFrames in dcmiod/include/dcmtk/dcmiod/iodutil.h. Tracking issue #1281 and the VulnCheck advisory provide additional context.
Workarounds
- Place a DICOM-aware proxy or validator in front of DCMTK-based services to reject instances whose NumberOfFrames is inconsistent with the PixelData length.
- Disable or firewall off the ConcatenationLoader ingestion path if multi-frame concatenation reassembly is not required.
- Enforce strict TLS and mutual authentication on DICOM endpoints to limit the set of senders capable of delivering crafted files.
# Build DCMTK from the patched source tree
git clone https://github.com/DCMTK/dcmtk.git
cd dcmtk
git checkout c33790827a192a598d20463af701a8b819f46ec1
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j$(nproc)
sudo make install
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

