Skip to main content
Vulnerability Database/CVE-2026-44033

CVE-2026-44033: OFFIS DCMTK XML Parser DOS Vulnerability

CVE-2026-44033 is a denial of service vulnerability in OFFIS DCMTK 3.7.0 XML parser caused by uncontrolled recursion. Attackers can crash processes using crafted XML with deeply nested elements. This post covers technical details, affected versions, impact, and mitigation steps.

Published:

CVE-2026-44033 Overview

CVE-2026-44033 is an uncontrolled recursion flaw [CWE-674] in the bundled XML parser of OFFIS DCMTK 3.7.0. The vulnerability resides in XMLNode::ParseXMLElement() and XMLNode::emptyTheNode() within ofstd/libsrc/ofxml.cc. An attacker can trigger stack exhaustion and a process crash by supplying a crafted XML document containing deeply nested elements. The parser is reachable through dcmencap when encapsulating a Clinical Document Architecture (CDA) document, and through any application that calls OFXMLParser::parseFile() or OFXMLParser::parseString() on untrusted input. The issue is resolved in commit d12e350e687530eb41e2b0c860aff4d8c04e5941.

Critical Impact

A single malformed XML file processed by a DCMTK-based medical imaging tool causes denial of service through stack exhaustion, disrupting DICOM processing workflows.

Affected Products

  • OFFIS DCMTK 3.7.0
  • Applications linking the bundled ofxml parser (ofstd/libsrc/ofxml.cc)
  • dcmencap utility when encapsulating CDA documents

Discovery Timeline

  • 2026-10-08 - CVE-2026-44033 published to NVD
  • 2026-10-08 - Last updated in NVD database

Technical Details for CVE-2026-44033

Vulnerability Analysis

The DCMTK XML parser recursively descends into nested XML elements without enforcing a maximum recursion depth. Each nested element consumes additional stack frames in XMLNode::ParseXMLElement(). When the input contains thousands of nested elements, the call stack is exhausted and the host process crashes.

The same unbounded recursion exists in XMLNode::emptyTheNode(), which recursively frees child nodes. Even cleanup of a partially parsed deeply nested document triggers the condition. The flaw is categorized under [CWE-674] Uncontrolled Recursion.

Root Cause

Neither ParseXMLElement() nor emptyTheNode() tracked recursion depth or compared it against a bound before recursing. The bundled parser treated element nesting depth as effectively unlimited, trusting the input document structure.

Attack Vector

Exploitation requires an attacker to deliver a crafted XML document to a DCMTK-based application. Delivery paths include invoking dcmencap on an attacker-supplied CDA file, or any workflow that passes untrusted input to OFXMLParser::parseFile() or OFXMLParser::parseString(). User interaction is required to process the file. Successful exploitation produces a denial of service only; confidentiality and integrity are not affected.

c
/*
 *
- *  Copyright (C) 2011-2022, OFFIS e.V.
+ *  Copyright (C) 2011-2026, OFFIS e.V.
 *  All rights reserved.  See COPYRIGHT file for details.
 *
 *  This software and supporting documentation were slightly modified by

Source: DCMTK commit d12e350e

The patch introduces a new error code enforcing a maximum recursion depth:

text
    case eXMLErrorBase64DecodeTruncatedData:      return _CXML("Warning: Base64-string is truncated");
    case eXMLErrorBase64DecodeIllegalCharacter:   return _CXML("Error: Base64-string contains an illegal character");
    case eXMLErrorBase64DecodeBufferTooSmall:     return _CXML("Error: Base64 decode output buffer is too small");
+
+    // DCMTK: additional error codes
+    case eXMLErrorRecursionDepthExceeded:         return _CXML("Error: Maximum recursion depth exceeded in XML document");
    };
    return _CXML("Unknown");
}

Source: DCMTK commit d12e350e

Detection Methods for CVE-2026-44033

Indicators of Compromise

  • Unexpected crashes of dcmencap or other DCMTK-linked binaries during XML or CDA processing.
  • Core dumps showing deep call stacks in XMLNode::ParseXMLElement or XMLNode::emptyTheNode.
  • XML files containing abnormally deep nesting levels (hundreds or thousands of opening tags without matching closures at shallow depth).

Detection Strategies

  • Inspect inbound XML and CDA documents for nesting depth before passing them to DCMTK tools.
  • Monitor process exit codes and segmentation faults from applications that invoke OFXMLParser::parseFile() or OFXMLParser::parseString().
  • Correlate parser crashes with the SHA256 hash of the triggering input file for forensic analysis.

Monitoring Recommendations

  • Alert on repeated abnormal terminations of DCMTK utilities within medical imaging pipelines.
  • Log and review XML inputs processed by dcmencap in HL7 and DICOM integration workflows.
  • Track DCMTK library versions across endpoints and workstations handling clinical imaging data.

How to Mitigate CVE-2026-44033

Immediate Actions Required

  • Update DCMTK from the official repository to a build that includes commit d12e350e687530eb41e2b0c860aff4d8c04e5941.
  • Audit all applications that embed the bundled ofxml parser and rebuild them against the patched source.
  • Restrict dcmencap invocations to inputs sourced from authenticated, trusted systems only.

Patch Information

The fix is committed to the DCMTK upstream repository and adds the eXMLErrorRecursionDepthExceeded error code to enforce a maximum XML nesting depth. See the GitHub Commit Overview and the DCMTK Issue Tracker #1214 for upstream details.

Workarounds

  • Pre-validate XML and CDA inputs with a hardened parser that enforces a nesting depth limit before passing files to DCMTK.
  • Run DCMTK tools in sandboxed or containerized environments with constrained stack and CPU limits to contain crashes.
  • Reject XML documents exceeding a reasonable element depth (for example, 256 levels) at the ingestion boundary.
bash
# Example: reject XML files with excessive nesting before invoking dcmencap
max_depth=256
depth=$(grep -o '<' "$1" | wc -l)
if [ "$depth" -gt "$max_depth" ]; then
  echo "Rejected: XML nesting exceeds $max_depth" >&2
  exit 1
fi
dcmencap "$1" output.dcm

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

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.