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.
Originally disclosed on Cisco Talos
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.
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
- Create a PDF with embedded JavaScript that saves a reference to this.info.
- Close the document using app.activeDocs[0].closeDoc().
- Access a property of the saved this.info reference, such as Keywords or Subject.
- 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.