Accusoft ImageGear PNG IHDR width code execution vulnerability
A specially crafted PNG file with a large IHDR width causes an out-of-bounds write in the Accusoft ImageGear library's PNG header parser, potentially leading to remote code execution. An attacker can exploit this by providing a malformed file to a victim.
Originally disclosed on Cisco Talos
An exploitable out-of-bounds write vulnerability exists in the igcore19d.dll PNG header-parser of the Accusoft ImageGear 19.3.0 library. A specially crafted PNG file can cause an out-of-bounds write, resulting in a remote 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 an integer overflow in the calculation of an index used to write to a buffer, caused by a large IHDR width value and insufficient bounds checking.
Impact
This could allow an attacker to achieve remote code execution.
What the attacker needed
Victim opens a malicious PNG file
The fix
The vendor patched the vulnerability.
How it was found
- Craft a PNG file with an IHDR width field in the range 0xFFBA to 0xFFFF.
- Ensure the DIB bit depth is 16 or less.
- Load the malformed PNG file using the IG_load_file function.
- The library processes the PNG header and triggers 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 handles images. When the library reads a PNG file with a very large width value, it writes data outside the memory it allocated, which can crash the program or let an attacker run their own code. The attacker just needs to trick someone into opening a malicious image file.
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.