Skip to content
Memory corruption Advisory Advanced CVE-2020-13547

Foxit Reader JavaScript media openPlayer type confusion vulnerability

A type confusion in Foxit Reader's JavaScript engine allows a crafted PDF to cause memory corruption and potentially arbitrary code execution. An attacker must trick the user into opening a malicious file or visiting a malicious site if the browser plugin is enabled.

Aleksandar Nikolic Follow

Originally disclosed on Cisco Talos

High 8.8 View original

A type confusion vulnerability exists in the JavaScript engine of Foxit Software’s Foxit PDF Reader, version 10.1.0.37527. A specially crafted PDF document can trigger an improper use of an object, resulting in memory corruption and 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

Likely the openPlayer function does not properly validate the type of its argument, allowing an object with an 'annot' property to be used where a PlayerArgs object is expected, leading to type confusion.

Impact

This could lead to out-of-bounds memory read and write access, which could ultimately be abused to achieve arbitrary code execution.

What the attacker needed

Victim opens a malicious PDF; or victim visits a malicious site if browser plugin enabled

How it was found

  1. Create a PDF document containing JavaScript that constructs an object with an 'annot' property referencing the global object.
  2. Call this.app.media.openPlayer with that object as the argument.
  3. Open the PDF in Foxit Reader to trigger the type confusion and memory corruption.

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 type confusion bug means the program treats one kind of object as if it were a different kind, which can lead to memory being read or written incorrectly. In this case, a PDF with JavaScript can call a media function with the wrong kind of object, corrupting memory and possibly letting an attacker run their own code. The victim must open a malicious PDF or visit a malicious site if the browser plugin is active.

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.