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

Adobe Acrobat Reader DC Document ID Remote Code Execution Vulnerability

A PDF with an overly large Document ID field and embedded JavaScript that references this.docID causes a stack-based buffer overflow when the ID is hex-encoded. An attacker could exploit this to overwrite the return address and potentially achieve arbitrary code execution.

Aleksandar Nikolic Follow

Originally disclosed on Cisco Talos

High 8.8 View original

A specific Javascript script embedded in a PDF file can cause the document ID field to be used in an unbounded copy operation leading to stack-based buffer overflow when opening a specially crafted PDF document in Adobe Acrobat Reader DC 2018.009.20044. This stack overflow can lead to return address overwrite, which…

Aleksandar Nikolic, 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 hex-encoding routine for the Document ID lacks a bounds check on the output buffer size, allowing a stack buffer overflow.

Impact

This could lead to arbitrary code execution, though the /GS protection partially mitigates it and can be bypassed.

What the attacker needed

Victim opens a malicious PDF; Adobe Acrobat Reader DC 2018.009.20044

How it was found

  1. Create a PDF with an overly large Document ID field in the trailer.
  2. Embed JavaScript that references this.docID.
  3. Open the PDF in Adobe Acrobat Reader DC 2018.009.20044.
  4. The JavaScript dereferences this.docID, triggering the hex-encoding routine.
  5. The routine writes beyond the stack buffer, causing a crash or potential code execution.

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 a special identifier called the Document ID. If this ID is made extremely long and the PDF also contains a small script that reads it, the program writes more data than it has space for, corrupting memory. This can let an attacker run their own code on the victim's computer when the PDF is opened.

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 Aleksandar Nikolic

View all

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