Accusoft ImageGear DICOM parse_dicom_meta_info code execution vulnerability
A specially crafted DICOM file can cause an out-of-bounds write in Accusoft ImageGear's parse_dicom_meta_info function, leading to remote code execution. An attacker can trigger this by providing a victim with a malicious DICOM file.
Originally disclosed on Cisco Talos
A code execution vulnerability exists in the DICOM parsedicommetainfo functionality of Accusoft ImageGear 19.7. A specially crafted malformed file can cause an out-of-bounds write.
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 code does not check if a memory allocation fails, and then writes to a null pointer with an attacker-controlled offset.
Impact
This could allow an attacker to execute arbitrary code on the victim's system.
What the attacker needed
Victim opens a malicious DICOM file
How it was found
- Craft a DICOM file with a large size value for a tag in group 0x0002.
- Load the malformed DICOM file using the vulnerable library.
- The library attempts to allocate memory based on the large size, which fails.
- The null pointer is then used in a write operation, causing an out-of-bounds write.
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 bug in a library that reads DICOM image files. When the library tries to process a malformed file, it can write data to a memory location it should not, which can let an attacker run their own code on the victim's computer. The attacker only needs to send a specially crafted file to the victim.
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.