Skip to content
Memory corruption Advisory Advanced CVE-2018-3998

Atlantis Word Processor Windows Enhanced Metafile Code Execution Vulnerability

The Windows enhanced metafile parser in Atlantis Word Processor trusts a size field from the file header to allocate a heap buffer, then copies a fixed 0x64-byte header into it. An attacker who convinces a victim to open a crafted document with an embedded EMF image can cause heap corruption and potentially execute code.

A member Follow

Originally disclosed on Cisco Talos

High 8.8 View original

An exploitable heap-based buffer overflow vulnerability exists in the Windows enhanced metafile parser of Atlantis Word Processor, version 3.2.5.0. A specially crafted image embedded within a document can cause an undersized allocation, resulting in an overflow when the application tries to copy data into it.

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

The parser allocates a heap buffer using an attacker-controlled file size field from the EMF header, then copies a hard-coded 0x64-byte header into it without validating that the allocation is at least that large.

Impact

Heap corruption could allow code execution under the context of the application, though the text notes the overflow may not corrupt memory if the header copy happens to fit.

What the attacker needed

Victim opens a crafted document; document contains an embedded EMF image

How it was found

  1. Create a document containing an embedded image whose file extension identifies it as a Windows enhanced metafile.
  2. Craft the EMF header so its size field is smaller than 0x64 bytes.
  3. Convince the victim to open the document in Atlantis Word Processor.
  4. The application reads the header, allocates a buffer based on the small size field, and copies 0x64 bytes into it, corrupting the heap.

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 word processor can show pictures inside documents, and one picture format is the Windows enhanced metafile. The program reads a number from the picture file that says how big the file is, uses that number to reserve memory, then copies a fixed-size chunk of data into that memory without checking the number is large enough. If the number is too small, the copy spills past the reserved area and corrupts memory, which can 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 A member

View all

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