Foxit Reader checkThisBox type confusion vulnerability
A type confusion vulnerability in Foxit Reader's JavaScript checkThisBox method allows a malicious PDF to cause memory corruption, potentially leading to remote code execution. An attacker could exploit this by crafting a PDF that triggers the flaw when opened by a victim.
Originally disclosed on Cisco Talos
A type confusion vulnerability exists in the Javascript checkThisBox method as implemented in Foxit Reader 12.1.2.15332. Specially crafted Javascript code inside a malicious PDF document can cause memory corruption and lead to remote 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 checkThisBox method does not properly validate the type of its first argument, leading to a type confusion where a non-integer object is treated as a pointer and later dereferenced.
Impact
This could lead to remote code execution, allowing an attacker to run arbitrary code on the victim's machine.
What the attacker needed
Victim opens a malicious PDF
The fix
The vulnerability was fixed by Foxit in a patch release.
How it was found
- Create a PDF with JavaScript that calls checkThisBox with a non-integer argument.
- Open the PDF in Foxit Reader to trigger the vulnerability.
- Observe memory corruption and potential crash in the debugger.
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.
This report describes a flaw in Foxit Reader, a program for viewing PDF files. When a PDF contains JavaScript code that calls a specific function with the wrong type of input, the program gets confused and may crash or allow an attacker to run their own code. The victim only needs to open a malicious PDF file.
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.