Skip to content
Memory corruption Advisory Advanced CVE-2022-29465

Accusoft ImageGear PSD Header processing memory allocation out-of-bounds write vulnerability

A missing bounds check in the PSD header processing of Accusoft ImageGear 20.0 allows a specially crafted PSD file to cause an out-of-bounds heap write. An attacker can provide a malicious file to trigger memory corruption, potentially leading to code execution.

Emmanuel Tacheau Follow

Originally disclosed on Cisco Talos

High 8.1 View original

An out-of-bounds write vulnerability exists in the PSD Header processing memory allocation functionality of Accusoft ImageGear 20.0. A specially-crafted malformed file can lead to memory corruption.

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 buffer size calculation for the PSD header processing does not account for the number of channels, leading to a buffer that is too small and subsequent out-of-bounds writes.

Impact

The out-of-bounds write can lead to memory corruption and possibly code execution.

What the attacker needed

Victim opens a malicious PSD file

How it was found

  1. Craft a malformed PSD file with specific header values.
  2. Load the file using the ImageGear library.
  3. The library processes the PSD header and allocates a buffer based on the header values.
  4. Due to the missing bounds check, the buffer is too small.
  5. The library writes channel data into the 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.

When a program reads a file, it often allocates a buffer in memory to hold data. If the program doesn't check that the data fits within the buffer, it can write past the end, corrupting other memory. Here, a malformed PSD image file causes the program to write beyond a small 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.

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.