Accusoft ImageGear TIFF handle_COMPRESSION_PACKBITS memory corruption vulnerability
A memory corruption vulnerability exists in the TIFF handle_COMPRESSION_PACKBITS functionality of Accusoft ImageGear 19.7. A specially crafted malformed file can cause a memory corruption, potentially leading to code execution.
Originally disclosed on Cisco Talos
A memory corruption vulnerability exists in the TIFF handleCOMPRESSIONPACKBITS functionality of Accusoft ImageGear 19.7. A specially crafted malformed file can cause a memory corruption.
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 due to a missing or incorrect cast when computing the length of a run in PackBits decompression, leading to an out-of-bounds write.
Impact
An attacker could exploit this to cause memory corruption, potentially leading to code execution or a denial of service.
What the attacker needed
Victim opens a malicious TIFF file
How it was found
- Craft a malformed TIFF file that triggers the PackBits decompression path with a negative run length byte.
- Load the malformed TIFF file using the vulnerable ImageGear library.
- The library processes the file and reaches the handle_COMPRESSION_PACKBITS function.
- The function miscalculates the number of bytes to write due to an integer overflow.
- An out-of-bounds write occurs, causing memory corruption.
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 TIFF image files. When the library processes a specially crafted TIFF file, it miscalculates how much data to write into a memory buffer, causing it to write past the end of the buffer. This can crash the program or potentially allow an attacker to 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.