Skip to content
Memory corruption Advisory Advanced CVE-2018-3957CVE-2018-3958CVE-2018-3959CVE-2018-3960CVE-2018-3961CVE-2018-3962

Foxit PDF Reader JavaScript this.info multiple remote code execution vulnerabilities

Six use-after-free vulnerabilities exist in Foxit PDF Reader's JavaScript engine when accessing properties of the this.info object after closing the document. An attacker could exploit these to execute arbitrary code by tricking a user into opening a malicious PDF.

Aleksandar Nikolic Follow

Originally disclosed on Cisco Talos

High 8.0 View original

A total of six separate use-after-free vulnerabilities exist in the JavaScript engine of Foxit Software’s Foxit PDF Reader version 9.1.0.5096. A specially crafted PDF document can trigger a previously freed object in memory to be reused, resulting in arbitrary code execution.

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

The JavaScript engine allows continued execution after the document is closed, and accessing saved references to this.info properties then dereferences freed memory.

Impact

An attacker could execute arbitrary code on the victim's machine by convincing them to open a malicious PDF, or by visiting a malicious site if the browser plugin is enabled.

What the attacker needed

Victim opens a malicious PDF; or visits a malicious site with plugin enabled; closeDoc requires higher privileges or user approval

The fix

The vendor patched the vulnerabilities in version 9.1.0.5096.

How it was found

  1. Create a PDF with embedded JavaScript that saves a reference to this.info.
  2. Close the document using app.activeDocs[0].closeDoc().
  3. Access a property of the saved this.info reference, such as Keywords or Subject.
  4. The access triggers a use-after-free crash, which can be exploited for 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 use-after-free bug happens when a program frees memory but then keeps using it, like deleting a file but still trying to open it. Here, the PDF reader's JavaScript can close the document, which frees memory, but then the script still tries to read or change document information like the author or subject. An attacker can craft a PDF that does this and potentially run their own code on the victim's computer.

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.