Skip to content
Memory corruption Advisory Advanced CVE-2021-21945CVE-2021-21944

Accusoft ImageGear TIFF parser heap-based buffer overflow vulnerabilities

Two heap-based buffer overflow vulnerabilities exist in the TIFF parser of Accusoft ImageGear 19.10. A specially crafted TIFF file can trigger an out-of-bounds write, potentially leading to code execution or a crash.

Francesco Benvenuto Follow

Originally disclosed on Cisco Talos

Critical 9.8 View original

Two heap-based buffer overflow vulnerabilities exist in the TIFF parser functionality of Accusoft ImageGear 19.10. A specially-crafted file can lead to a heap buffer overflow.

Francesco Benvenuto, 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 parser calculates the destination buffer size using one formula but writes data using a different pattern that can exceed that size, without a boundary check.

Impact

An attacker could exploit these vulnerabilities to cause a heap buffer overflow, potentially leading to code execution or a denial of service.

What the attacker needed

Victim opens a malicious TIFF file; application uses Accusoft ImageGear 19.10

The fix

The vulnerabilities were fixed in a later release; the vendor planned a release for Q1 2022.

How it was found

  1. Craft a TIFF file with SamplesPerPixel greater than 2, BitsPerSample equal to 0xc, PlanarConfiguration equal to 2, and either TileOffsets or StripOffsets with N greater than 1.
  2. Load the malicious TIFF file in a vulnerable application using Accusoft ImageGear 19.10.
  3. The parser allocates source and destination buffers based on tag values.
  4. During parsing, the function FUN_10074d50 writes converted pixel data into the destination buffer.
  5. Due to the writing pattern and missing boundary check, the write goes out of bounds, 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 malicious TIFF image file causes the image parser to write past the end of a buffer, which can crash the program or let an attacker 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.

More by Francesco Benvenuto

View all

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