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.
Originally disclosed on Cisco Talos
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.
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.