CVE-2026-12805: OFFIS DCMTK heap overflow in XMLNode::parseFile

CVE-2026-12805 · Severity: medium · CVSS 6.3 · Published 2026-06-21

OFFIS DCMTK is a widely used collection of libraries and applications implementing the DICOM standard for medical imaging. A vulnerability in its XML parsing component allows an attacker to cause a system crash or potentially execute unauthorized code by providing a specially crafted input, such as a named pipe. This could disrupt medical imaging workflows or compromise the integrity of systems processing clinical documents.

Quick answers

Is CVE-2026-12805 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-12805 being exploited in the wild.
How severe is CVE-2026-12805?
Medium severity, with a CVSS score of 6.3, published 21 June 2026.
Which products and versions are affected?
OFFIS DCMTK 3.0 through 3.7.0.
Is there a fix for CVE-2026-12805?
A patch was published on 2026-05-23: Fix committed to DCMTK repository. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-12805 attacked?
It is attacked over the network or with local access, in a software library.
Am I affected by CVE-2026-12805?
Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A heap-based buffer overflow exists in XMLNode::parseFile() within ofstd/libsrc/ofxml.cc. The vulnerability occurs because the code fails to validate the return value of ftell() when processing input. When a non-seekable file (such as a FIFO/named pipe) is used, ftell() returns -1. The application subsequently uses this value to allocate a small 3-byte buffer via malloc(-1 + 4) and then attempts to read a massive amount of data (SIZE_MAX bytes) into that buffer via fread(), leading to a heap overflow. This can be triggered remotely if an application using DCMTK (like cda2dcm) processes externally provided file paths or data streams. A patch has been released in commit 1d4b3815c0987840a983160bfc671fef63a3105b.

Affected products

  • OFFIS DCMTK 3.0 through 3.7.0

Timeline

  • 2026-05-16: disclosed: Vulnerability reported to vendor by researchers from Instituto Tecnológico de Costa Rica.
  • 2026-05-19: other: Issue tracked in vendor Redmine as #1208.
  • 2026-05-23: patched: Fix committed to DCMTK repository.
  • 2026-06-21: advisory: CVE-2026-12805 published.

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.