Foxit Reader field value property type confusion vulnerability
A type confusion flaw in Foxit Reader's handling of the value property of a Radio Button field allows a malicious PDF's JavaScript to corrupt memory. An attacker could achieve arbitrary code execution by tricking a user into opening the file or visiting a malicious site with the browser plugin enabled.
Originally disclosed on Cisco Talos
A type confusion vulnerability exists in the way Foxit Reader 12.1.2.15356 handles field value properties. A specially crafted Javascript code inside a malicious PDF document can trigger this vulnerability, which can lead to memory corruption and result 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
Likely the Radio Button field object is freed and replaced during a Calculate action triggered by setting its value, and later code uses the stale object without validating its type.
Impact
An attacker could cause memory corruption and potentially achieve arbitrary code execution, though the text does not demonstrate a full exploit.
What the attacker needed
Victim opens a malicious PDF; or victim visits a malicious site; browser plugin extension enabled
How it was found
- Create a PDF with a text field and a radio button field.
- Assign a Calculate action to the text field that calls deletePages.
- Set the value property of the radio button field to trigger the action.
- Open the PDF in Foxit Reader to cause the type confusion and crash.
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, so it reads or writes the wrong memory. Here, a PDF's JavaScript changes a form field's value, which frees and replaces objects, and later the program uses the old object without checking its type. This can crash the program or let an attacker run their own code.
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.