Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessDeliver crafted non-seekable or malformed XML file to DCMTK service
-
DeliveryUser or process invokes XMLNode::parseFile on attacker input
-
Exploitftell() returns -1, bypassing original `!l` size guard
-
ExecutionCorrupted size used for heap buffer allocation
-
PersistFile contents written beyond allocated heap region
-
ImpactProcess crash or arbitrary code execution within DCMTK context
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The vulnerability triggers when XMLNode::parseFile is called with a file descriptor for which ftell() returns -1 - specifically, non-seekable file types such as named pipes, character devices, or sockets. Exploitation requires passive user interaction (CVSS 4.0 UI:P): a user or automated pipeline must invoke DCMTK's XML parsing path against an attacker-controlled or attacker-influenced input. No privileges are required (PR:N). The attacker must be able to deliver the malicious input to the parsing function - either directly through a network-accessible DCMTK service that accepts and parses XML-format DICOM data, or indirectly by tricking a local operator into opening a crafted file. Exploitation is scoped to contexts where XMLNode::parseFile is exercised on external input; DCMTK deployments that never pass externally sourced files to this function are not at risk from this specific flaw. No non-default configuration is required - the vulnerable function is part of the core ofstd library present in all DCMTK builds. |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N) scores 2.1 - low on its face, driven primarily by the passive-interaction requirement (UI:P) and low impact ratings across all dimensions. This score may understate real-world risk for a heap buffer overflow: depending on DCMTK build hardening (ASLR, stack canaries, heap hardening), such overflows can escalate from crash to code execution. The supplemental threat metric E:P (exploit publicly available) confirms exploitation is not theoretical. No EPSS score was provided, so statistical exploitation probability cannot be quantified; no CISA KEV listing was found, indicating no confirmed mass exploitation at time of analysis. The primary risk population is medical imaging infrastructure where DCMTK parses XML from external or semi-trusted sources - PACS systems receiving DICOM XML datasets from partner facilities represent the highest-exposure scenario. The conflicting signal between the low CVSS 4.0 base score and the confirmed public POC means defenders should treat this as medium priority for any externally reachable DCMTK XML parsing path, particularly in healthcare environments where application availability and data integrity carry regulatory weight. |
| Exploit ScenarioDerived | An attacker who can deliver a crafted non-seekable file descriptor or malformed XML file to a DCMTK-based medical imaging service - for example, by submitting a malicious DICOM XML payload to a network-accessible PACS endpoint, or by convincing a radiology user to open an attacker-supplied XML configuration file - causes parseFile to receive -1 from ftell(), bypassing the size guard and triggering heap corruption. A public proof-of-concept is documented in a Medium article (https://medium.com/@faboherrera.fabo/dcmtk-vulnerability-report-201afc687790), demonstrating the triggering condition. Depending on heap layout and binary hardening, the outcome ranges from DCMTK process crash (service disruption) to potential arbitrary code execution within the process context. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 22, 2026
Heap-based buffer overflow in OFFIS DCMTK's XMLNode::parseFile function (ofstd/libsrc/ofxml.cc) affects all versions through 3.7.0, exploitable by any remote party who can supply a crafted or non-seekable XML input to the parser. The root cause - confirmed by the upstream patch commit - is that the original guard if (!l) failed to catch a -1 return from ftell(), allowing a corrupted buffer size to propagate into heap allocation and subsequent write. A public proof-of-concept exploit exists per VulDB and a published Medium writeup; no active exploitation is confirmed via CISA KEV. The CVSS 4.0 score of 2.1 reflects passive-interaction and low-impact ratings, but the presence of public exploit code elevates practical risk for any DCMTK deployment that parses externally influenced XML files.
RemediationAI
Apply the upstream patch commit 1d4b3815c0987840a983160bfc671fef63a3105b, available at https://github.com/DCMTK/dcmtk/commit/1d4b3815c0987840a983160bfc671fef63a3105b and the authoritative DCMTK repository at https://git.dcmtk.org/?p=dcmtk.git;a=commit;h=1d4b3815c0987840a983160bfc671fef63a3105b. The vendor is noted to have released a fixed version; however, the exact patched release version number is not independently confirmed from available data - only the commit is verified (upstream fix available at commit level; released patched version not independently confirmed). As a compensating control prior to patching, restrict DCMTK deployments from invoking XMLNode::parseFile with input derived from non-regular files (pipes, sockets, character devices) or from untrusted external sources; enforce application-layer input validation to accept only regular, seekable files before passing them to the XML parser. Note that restricting file source types may impact DICOM XML interoperability with external imaging systems in networked PACS environments. Additionally, deploy DCMTK applications with OS-level heap hardening (ASLR enabled, position-independent executables) to reduce exploitability if patching is delayed.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
OFFIS DCMTK (DICOM Toolkit) is a widely deployed open-source C++ library used to build DICOM-compliant medical imaging applications, PACS servers, and radiology workstations. The vulnerability resides in the ofstd library's XMLNode::parseFile function (ofstd/libsrc/ofxml.cc), which uses ftell() to determine file size before allocating a heap buffer and reading file content into it. The patch commit (1d4b3815c0987840a983160bfc671fef63a3105b) changes the check from if (!l) to if (l <= 0) with the comment 'handle situation where ftell() returns -1.' On POSIX systems, ftell() returns -1 when the file descriptor is a pipe, socket, character device, or otherwise non-seekable stream. When -1 is not caught and is implicitly converted to a large unsigned size type, the subsequent heap allocation either succeeds with a wildly incorrect size or triggers an integer wrap, and the following file-read operation overwrites memory beyond the allocated region - a classic CWE-122 heap-based buffer overflow. The CPE string cpe:2.3:a:offis:dcmtk:*:*:*:*:*:*:*:* confirms the flaw spans the entire DCMTK product line across all versions.
Know when Dcmtk gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
Network-delivered crafted file requires passive user parsing (UI:R); no privileges needed; impact capped at Low across C/I/A consistent with vendor's CVSS 4.0 assessment and limited scope.
Primary rating from Vendor (VulDB).
CVSS VectorVendor: VulDB
Lifecycle Timeline
2DescriptionCVE.org
A flaw has been found in OFFIS DCMTK up to 3.7.0. The affected element is the function XMLNode::parseFile in the library ofstd/libsrc/ofxml.cc. Executing a manipulation can lead to heap-based buffer overflow. The attack may be performed from remote. The exploit has been published and may be used. This patch is called 1d4b3815c0987840a983160bfc671fef63a3105b. It is best practice to apply a patch to resolve this issue. The vendor was contacted early, responded in a very professional manner and quickly released a fixed version of the affected product.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.
OFFIS.de DCMTK 3.6.3 and below is affected by: Buffer Overflow. Rated critical severity (CVSS 9.8), this vulnerability i
Stack-based buffer overflow in the parsePresentationContext function in storescp in DICOM dcmtk-3.6.0 and earlier allows
Buffer Overflow vulnerability in DCMTK v.3.6.8 allows an attacker to execute arbitrary code via the EctEnhancedCT method
An incorrect type conversion vulnerability exists in the DVPSSoftcopyVOI_PList::createFromImage functionality of OFFIS D
DCMTK v3.6.7 was discovered to contain a memory leak via the T_ASC_Association object. Rated high severity (CVSS 7.5), t
(1) movescu.cc and (2) storescp.cc in dcmnet/apps/, (3) dcmnet/libsrc/scp.cc, (4) dcmwlm/libsrc/wlmactmg.cc, (5) dcmprsc
OFFIS DCMTK's (All versions prior to 3.6.7) service class user (SCU) is vulnerable to relative path traversal, allowing
OFFIS DCMTK's (All versions prior to 3.6.7) service class provider (SCP) is vulnerable to path traversal, allowing an at
dcmdata in DCMTK before 3.6.9 has a segmentation fault via an invalid DIMSE message. Rated medium severity (CVSS 5.3), t
Heap over-read in DCMTK through 3.7.0 allows unauthenticated remote attackers to crash applications or leak adjacent hea
Deeply nested DICOM sequence (SQ) elements delivered to a DCMTK 3.7.0-based service drive the parser into unbounded recu
Heap out-of-bounds write in the DICOM toolkit DCMTK's JPEG encoder helpers togglePlanarConfiguration8 and togglePlanarCo
EUVD-2026-38191
GHSA-35pp-gpq2-4898
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB