Skip to main content
Vulnerability Database/CVE-2025-11266

CVE-2025-11266: Grassroots DICOM Library DOS Vulnerability

CVE-2025-11266 is an out-of-bounds write flaw in Grassroots DICOM library triggered by malformed files. Opening a crafted DICOM file causes segmentation faults and denial-of-service. This article covers technical details, impact, and mitigation.

Published:

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-2025-11266 Overview

CVE-2025-11266 is an out-of-bounds write vulnerability in the Grassroots DICOM library (GDCM), an open-source toolkit for parsing Digital Imaging and Communications in Medicine (DICOM) files. The flaw is triggered when GDCM parses a malformed DICOM file containing encapsulated PixelData fragments. An unsigned integer underflow in buffer indexing produces an out-of-bounds memory access, resulting in a segmentation fault. Opening a crafted DICOM file is sufficient to crash the parser, producing a denial-of-service condition. CISA tracked the issue in medical device advisory ICSMA-25-345-01, and upstream fixed it in GDCM v3.2.2.

Critical Impact

A single malicious DICOM file can crash any application linked against vulnerable GDCM versions, disrupting medical imaging workflows that rely on the library for parsing and viewing.

Affected Products

  • Grassroots DICOM (GDCM) versions prior to v3.2.2
  • Medical imaging applications and PACS components that embed GDCM for DICOM parsing
  • Third-party tools and viewers linking the vulnerable gdcmSequenceOfFragments code path

Discovery Timeline

  • 2025-12-12 - CVE-2025-11266 published to the National Vulnerability Database
  • 2026-10-07 - Last updated in NVD database

Technical Details for CVE-2025-11266

Vulnerability Analysis

The defect lives in Source/DataStructureAndEncodingDefinition/gdcmSequenceOfFragments.h, which handles encapsulated DICOM pixel data. Encapsulated PixelData is stored as a sequence of fragments, each delimited by item tags. When GDCM finishes parsing the last fragment, it inspects the trailing bytes to validate the sequence terminator (byte value 0xfe). The validation subtracts 3 from bv->GetLength() without first confirming the buffer holds at least three bytes. When a crafted file produces a fragment whose byte value length is less than 3, the subtraction underflows the unsigned size_t, producing a very large index that is dereferenced as an array offset. The result is an out-of-bounds memory read followed by a write back into the fragment buffer, categorized under [CWE-787].

Root Cause

The root cause is missing bounds validation before unsigned arithmetic. The original code assumed the final fragment always contained at least three trailing bytes, which attacker-controlled input invalidates. Because size_t cannot represent negative values, 0 - 3 wraps to SIZE_MAX - 2, causing the subsequent indexed access to reach well outside the allocated buffer.

Attack Vector

Exploitation requires local file input and user interaction: a victim opens or imports a malicious DICOM file into an application that uses GDCM. No authentication or network access is required. The outcome is a crash of the parsing process, degrading availability of imaging workstations, viewers, or batch-processing pipelines.

c
       const size_t lastf = Fragments.size() - 1;
       const ByteValue *bv = Fragments[ lastf ].GetByteValue();
       const char *a = bv->GetPointer();
-      gdcmAssertAlwaysMacro( (unsigned char)a[ bv->GetLength() - 3 ] == 0xfe );
+      gdcmAssertAlwaysMacro( bv->GetLength() >= 3 && (unsigned char)a[ bv->GetLength() - 3 ] == 0xfe );
       Fragments[ lastf ].SetByteValue( bv->GetPointer(), bv->GetLength() - 3 );
       is.seekg( -11, std::ios::cur );
       gdcm_assert( is.good() );

Source: GDCM commit 5829c95. The patch adds an explicit bv->GetLength() >= 3 guard before the subtraction, preventing the unsigned underflow that produced the out-of-bounds access.

Detection Methods for CVE-2025-11266

Indicators of Compromise

  • Repeated segmentation faults or crash dumps from processes linked against libgdcm when opening DICOM files
  • DICOM files containing encapsulated PixelData fragments with final fragment length less than 3 bytes
  • Unexpected termination of PACS viewers, converters, or ingestion workers after processing a single file

Detection Strategies

  • Inventory applications and container images that bundle GDCM and compare installed versions against v3.2.2
  • Scan DICOM intake queues with a validator that rejects fragments shorter than the item delimiter length
  • Correlate application crash telemetry with the filename and hash of the DICOM input being parsed at the time of failure

Monitoring Recommendations

  • Forward crash reports and core dumps from imaging workstations to a central log store for review
  • Alert on abnormal rates of process exits for known DICOM parsing binaries
  • Track inbound DICOM transfers from untrusted modalities or external referral partners

How to Mitigate CVE-2025-11266

Immediate Actions Required

  • Upgrade GDCM to v3.2.2 or later across all workstations, servers, and container images
  • Rebuild and redeploy downstream applications and Python bindings that statically link GDCM
  • Restrict ingestion of DICOM files to trusted sources until patched builds are rolled out

Patch Information

The upstream fix is published in GDCM release v3.2.2 and implemented in commit 5829c95. CISA documented the issue in the ICSMA-25-345-01 medical advisory, with the machine-readable record available as a CSAF JSON document.

Workarounds

  • Pre-validate DICOM files with a sanitizer that enforces minimum fragment length before passing them to GDCM
  • Run GDCM-based parsers in sandboxed or containerized worker processes so crashes do not take down the host application
  • Disable automatic opening of DICOM attachments received through email or external file shares
bash
# Verify the installed GDCM version and upgrade if below 3.2.2
gdcmdump --version

# Example: rebuild from the patched source tag
git clone https://github.com/malaterre/GDCM.git
cd GDCM
git checkout v3.2.2
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel
sudo cmake --install build

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.