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

Source: https://junglewise.ai/threats/cve-2026-12805-offis-dcmtk-heap-overflow-in-xmlnode-parsefile  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-21. Updated: 2026-06-21  
License: CC BY 4.0 with a link back

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

- [https://git.dcmtk.org/?p=dcmtk.git;a=commit;h=1d4b3815c0987840a983160bfc671fef63a3105b](https://git.dcmtk.org/?p=dcmtk.git;a=commit;h=1d4b3815c0987840a983160bfc671fef63a3105b)
- [https://github.com/DCMTK/dcmtk/commit/1d4b3815c0987840a983160bfc671fef63a3105b](https://github.com/DCMTK/dcmtk/commit/1d4b3815c0987840a983160bfc671fef63a3105b)
- [https://medium.com/@faboherrera.fabo/dcmtk-vulnerability-report-201afc687790](https://medium.com/@faboherrera.fabo/dcmtk-vulnerability-report-201afc687790)
- [https://support.dcmtk.org/redmine/issues/1208](https://support.dcmtk.org/redmine/issues/1208)
- [https://vuldb.com/cve/CVE-2026-12805](https://vuldb.com/cve/CVE-2026-12805)
- [https://vuldb.com/submit/836273](https://vuldb.com/submit/836273)
- [https://vuldb.com/vuln/372599](https://vuldb.com/vuln/372599)
