Skip to content
Memory corruption Advisory Advanced CVE-2020-6064

Accusoft ImageGear PCX uncompress_scan_line buffer copy operation code execution vulnerability

An out-of-bounds write vulnerability exists in the uncompress_scan_line function of Accusoft ImageGear when processing a specially crafted PCX file. An attacker could provide a malformed file to a victim to trigger the vulnerability, potentially leading to remote code execution.

Emmanuel Tacheau Follow

Originally disclosed on Cisco Talos

Critical 9.8 View original

An exploitable out-of-bounds write vulnerability exists in the uncompressscanline function of the igcore19d.dll library of Accusoft ImageGear, version 19.5.0. A specially crafted PCX file can cause an out-of-bounds write, resulting in a remote code execution.

Emmanuel Tacheau, on Cisco Talos

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 function uncompress_scan_line lacks a length check between the source buffer complete_scan_line_buffer and the destination buffer buff_mem_overwritten, allowing a write beyond the destination's allocated size.

What the attacker needed

Victim opens a malicious PCX file

How it was found

  1. Craft a PCX file with bits_per_pixel set to 2 and nplanes set to 2.
  2. Set Xmax and Xmin to equal values so that sizeX becomes 1, causing a small allocation for the destination buffer.
  3. Load the malformed PCX file via the IG_load_file function.
  4. The uncompress_scan_line function writes beyond the allocated buffer, 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 memory corruption bug in an image processing library. When the library opens a malicious PCX image file, it writes data past the end of a buffer, which can crash the program or allow an attacker to run their own code. The attacker only needs to trick someone into opening the 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.

More by Emmanuel Tacheau

View all

58 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.