Accusoft ImageGear TIFF tifread code execution vulnerability
A specially crafted TIFF file causes an out-of-bounds write in the TIFF parser of the Accusoft ImageGear library, because a loop count is derived from a file-controlled value. An attacker who supplies a malformed file to a victim could corrupt memory and potentially achieve remote code execution.
Originally disclosed on Cisco Talos
An exploitable out-of-bounds write vulnerability exists in the igcore19d.dll TIFF tifread parser of the Accusoft ImageGear 19.5.0 library. A specially crafted TIFF 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 the parser derives a loop count from a file-controlled word without checking it against the size of the fixed 0x400-byte stack buffer, so the write loop runs far past the buffer.
Impact
Memory corruption from the out-of-bounds write could lead to remote code execution when a victim opens the crafted file.
What the attacker needed
Victim opens a crafted TIFF file; attacker can deliver the file
How it was found
- Load a malformed TIFF file through the IG_load_file function.
- The parser reads a word from the file at offset 0xC2 and uses it to compute the loop limit.
- The write loop runs with that large limit and writes past the stack buffer, causing an access violation.
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.
Image libraries read picture files and copy parts of them into fixed-size memory areas. Here the program trusts a number stored in the file to decide how many times to write into a small buffer on the stack, so a large number makes it write past the end. Writing past a buffer can let an attacker overwrite nearby data and possibly 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.