Skip to main content

OFFIS DCMTK EUVDEUVD-2026-38191

| CVE-2026-12805 LOW
Heap-based Buffer Overflow (CWE-122)
2026-06-21 VulDB GHSA-35pp-gpq2-4898
2.1
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Deliver crafted non-seekable or malformed XML file to DCMTK service
  2. Delivery
    User or process invokes XMLNode::parseFile on attacker input
  3. Exploit
    ftell() returns -1, bypassing original `!l` size guard
  4. Execution
    Corrupted size used for heap buffer allocation
  5. Persist
    File contents written beyond allocated heap region
  6. Impact
    Process 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.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

DCMTK 3.5
DCMTK 3.0
DCMTK 3.2
DCMTK 3.4
DCMTK 3.3
DCMTK 3.7.0
DCMTK 3.6
DCMTK 3.1

Affected Packages

euvd dcmtk no fix

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

Vendor (VulDB) PRIMARY 2.1 MEDIUM
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
vuln.today AI 6.3 MEDIUM

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.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (VulDB).

CVSS VectorVendor: VulDB

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Severity Changed
Jun 21, 2026 - 20:22 NVD
MEDIUM LOW
CVSS changed
Jun 21, 2026 - 20:22 NVD
5.3 (MEDIUM) 2.1 (LOW)

DescriptionCVE.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

EPSS Score
0.3%
Top 81% exploitable
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

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.

SignalValue
Severity LOW
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

More in Dcmtk

View all
CVE-2019-1010228 CRITICAL POC
9.8 Jul 22

OFFIS.de DCMTK 3.6.3 and below is affected by: Buffer Overflow. Rated critical severity (CVSS 9.8), this vulnerability i

CVE-2015-8979 HIGH POC
7.5 Feb 15

Stack-based buffer overflow in the parsePresentationContext function in storescp in DICOM dcmtk-3.6.0 and earlier allows

CVE-2024-27628 HIGH POC
8.1 Jun 28

Buffer Overflow vulnerability in DCMTK v.3.6.8 allows an attacker to execute arbitrary code via the EctEnhancedCT method

CVE-2024-28130 HIGH POC
7.5 Apr 23

An incorrect type conversion vulnerability exists in the DVPSSoftcopyVOI_PList::createFromImage functionality of OFFIS D

CVE-2022-43272 HIGH POC
7.5 Dec 02

DCMTK v3.6.7 was discovered to contain a memory leak via the T_ASC_Association object. Rated high severity (CVSS 7.5), t

CVE-2013-6825 HIGH POC
7.2 Jun 10

(1) movescu.cc and (2) storescp.cc in dcmnet/apps/, (3) dcmnet/libsrc/scp.cc, (4) dcmwlm/libsrc/wlmactmg.cc, (5) dcmprsc

CVE-2022-2120 CRITICAL
9.8 Jun 24

OFFIS DCMTK's (All versions prior to 3.6.7) service class user (SCU) is vulnerable to relative path traversal, allowing

CVE-2022-2119 CRITICAL
9.8 Jun 24

OFFIS DCMTK's (All versions prior to 3.6.7) service class provider (SCP) is vulnerable to path traversal, allowing an at

CVE-2024-34509 MEDIUM POC
5.3 May 05

dcmdata in DCMTK before 3.6.9 has a segmentation fault via an invalid DIMSE message. Rated medium severity (CVSS 5.3), t

CVE-2026-97059 HIGH
8.8 Sep 24

Heap over-read in DCMTK through 3.7.0 allows unauthenticated remote attackers to crash applications or leak adjacent hea

CVE-2026-44031 HIGH
8.7 Oct 08

Deeply nested DICOM sequence (SQ) elements delivered to a DCMTK 3.7.0-based service drive the parser into unbounded recu

CVE-2026-133168 HIGH
8.5 Nov 19

Heap out-of-bounds write in the DICOM toolkit DCMTK's JPEG encoder helpers togglePlanarConfiguration8 and togglePlanarCo

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy