Skip to content
Memory corruption Advisory Advanced CVE-2019-5092

LEADTOOLS DICOM UI Parsing Code Execution Vulnerability

A heap out-of-bounds write exists in LEADTOOLS' DICOM UI tag parsing when a crafted DICOM image causes memmove to write beyond the allocated buffer. An attacker could potentially achieve code execution by supplying a specially crafted DICOM image.

Marcin Towalski Follow

Originally disclosed on Cisco Talos

High 8.8 View original

An exploitable heap out of bounds write vulnerability exists in the UI tag parsing functionality of the DICOM image format of LEADTOOLS 20. A specially crafted DICOM image can cause an offset beyond the bounds of a heap allocation to be written, potentially resulting in code execution.

Marcin Towalski and Cory Duplantis, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the length calculation for the memmove uses the original buffer size instead of the remaining space after the backslash, causing an out-of-bounds write.

Impact

A crafted DICOM image could cause a heap-based buffer overflow, potentially leading to code execution.

What the attacker needed

Victim opens a crafted DICOM image

The fix

The vendor patched the vulnerability.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

This report describes a memory corruption bug in a medical image parsing library. When the software reads a specially crafted DICOM file, it miscalculates how much space is needed and writes data past the end of a memory buffer, which can crash the program or let an attacker run their own code.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Marcin Towalski

View all

1 more disclosed report, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.