Skip to content
Memory corruption Advisory Advanced CVE-2017-2793

AntennaHouse DMC HTMLFilter UnCompressUnicode Code Execution Vulnerability

A malformed XLS string record with a character count far above the documented limit causes the UnCompressUnicode routine to write twice the allocated buffer size, corrupting the heap. An attacker could supply a crafted XLS file to the converter and potentially achieve arbitrary code execution.

Marcin 'Icewall' Noga Follow

Originally disclosed on Cisco Talos

High 8.3 View original

An exploitable heap corruption vulnerability exists in the UnCompressUnicode functionality of AntennaHouse DMC HTMLFilter used by MarkLogic 8.0-6. A specially crafted xls file can cause a heap corruption resulting in arbitrary code execution.

Marcin 'Icewall' Noga, 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 character count field in the XLS string record is not validated against the documented maximum, so the Unicode expansion loop writes two bytes per character into a buffer sized for the raw input.

Impact

Heap corruption could lead to arbitrary code execution, though the CVSS vector notes high attack complexity and required user interaction.

What the attacker needed

Victim opens or converts a crafted XLS file; converter processes untrusted XLS input

How it was found

  1. Create a malformed XLS file containing a string record whose character count exceeds the allowed maximum.
  2. Run the XLS to HTML converter with the malformed file as input.
  3. Observe the out-of-bounds write in UnCompressUnicode under Valgrind, followed by a heap corruption abort.

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.

The program converts spreadsheet files and stores text in a fixed-size memory area. A field in the file says how many characters the text has, and the program trusts that number without checking it. When it expands the text to a wider character format, it writes past the end of the memory area, which can let an attacker take over the program.

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 Marcin 'Icewall' Noga

View all

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