Accusoft ImageGear JPEG-JFIF lossless Huffman parser heap-based buffer overflow vulnerabilities
Two heap-based buffer overflow vulnerabilities exist in the JPEG-JFIF lossless Huffman parser of Accusoft ImageGear 19.10. A specially crafted JPEG file can trigger a heap buffer overflow, potentially leading to code execution.
Originally disclosed on Cisco Talos
Two heap-based buffer overflow vulnerabilities exists in the JPEG-JFIF lossless Huffman image parser functionality of Accusoft ImageGear 19.10. A specially-crafted file can lead to a heap buffer overflow.
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
The buffer size calculation for each component does not account for the maximum possible offset used when writing pixel data, and there is no boundary check before writing.
Impact
An attacker could exploit this to cause a heap buffer overflow, potentially leading to code execution with the privileges of the application.
What the attacker needed
Victim opens a malicious JPEG file; application uses ImageGear 19.10
How it was found
- Craft a JPEG-JFIF file with a SOF3 segment and specific component subsampling values.
- Set the image dimensions and precision to trigger the overflow condition.
- Load the malicious file in an application using Accusoft ImageGear 19.10.
- The parser writes past the allocated 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.
A heap buffer overflow happens when a program writes more data into a memory area than it was allocated for. Here, a malformed JPEG image causes the image parser to write past the end of a buffer, which can crash the program or 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.