Iceni Argus PDF Inflate+LZW Decompression Heap-Based Buffer Overflow Vulnerability
A heap-based buffer overflow occurs in Iceni Argus when converting a malformed PDF with an object encoded using multiple encoding types ending in LZW, because the LZW decoder lacks a bounds check on its output buffer. An attacker could exploit this to execute code under the context of the user running the converter.
Originally disclosed on Cisco Talos
An exploitable heap-based buffer overflow exists in Iceni Argus. When it attempts to convert a malformed PDF with an object encoded w/ multiple encoding types terminating with an LZW encoded type, an overflow may occur due to a lack of bounds checking by the LZW decoder.
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 LZW decoder loop writes bytes to a fixed-size buffer without checking whether the write pointer has exceeded the buffer's bounds, and the loop only terminates when it encounters an end-of-data code.
Impact
An attacker could execute arbitrary code under the context of the user running the converter, but the report does not demonstrate a full exploit beyond a crash.
What the attacker needed
Victim opens a malformed PDF; PDF object uses multiple encodings ending in LZW
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 PDF file can contain compressed data using several methods, including LZW. The program that converts PDFs to HTML has a fixed-size memory area for decompressing LZW data, but it does not check when it writes past the end of that area. By crafting a PDF that makes the decompression loop run too long, an attacker can overwrite adjacent memory and potentially 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.