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

Accusoft ImageGear TIFF index record out-of-bounds write vulnerability

The TIFF parser in Accusoft ImageGear 19.8 fails to check the size of values taken from a malformed index record, so a crafted TIFF file causes a memset to write past the end of a fixed-size heap buffer. An attacker could supply such a file to corrupt memory and potentially execute code.

Emmanuel Tacheau Follow

Originally disclosed on Cisco Talos

Critical 9.8 View original

An out-of-bounds write vulnerability exists in the TIFF parser of Accusoft ImageGear 19.8. A specially crafted malformed file can lead to code execution.

Emmanuel Tacheau and a member, 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 sigread function uses attacker-controlled values from the TIFF index record to compute both the size and offset of a memset into a fixed 0xA82-byte heap buffer without validating that the writes stay in bounds.

Impact

A crafted TIFF file could cause memory corruption and potentially code execution, as reflected in the CVSS score of 9.8.

What the attacker needed

Victim opens a crafted TIFF file; ImageGear 19.8 used to parse it

The fix

The vendor patched the issue in February 2021, presumably by validating the index record values before using them to size and offset the memset.

How it was found

  1. Craft a TIFF file containing a malformed index record whose element values control the memset size and offset.
  2. Load the malformed TIFF file with the ImageGear library.
  3. The parser iterates over the index record and fills the index_values buffer.
  4. The loop calls memset repeatedly, and the third call writes past the end of 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 TIFF file can contain a small table of numbers that tells the image library how to lay out its data. The library trusts those numbers without checking them, so it writes more data than the space it reserved, spilling into memory it does not own. That kind of memory corruption can sometimes be turned into running an attacker's 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.

More by Emmanuel Tacheau

View all

6 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.