Foxit PDF Reader AssociatedFile Annotation Type Confusion
A type confusion in Foxit PDF Reader when parsing a malformed associated file annotation can cause an out-of-bounds memory read. An attacker could exploit this to potentially disclose sensitive memory or achieve arbitrary code execution by tricking a user into opening a malicious PDF.
Originally disclosed on Cisco Talos
An exploitable type confusion vulnerability exists in the way Foxit PDF Reader version 9.0.1.1049 parses files with associated file annotations. A specially crafted PDF document can lead to an object of invalid type to be dereferenced, which can potentially lead to sensitive memory disclosure, and possibly to…
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 parser fails to validate that the object referenced by the /AF entry is of the expected FileSpec type, allowing a malformed object to be used as a different type.
Impact
The vulnerability could lead to sensitive memory disclosure and possibly arbitrary code execution, though the provided CVSS score indicates only confidentiality impact.
What the attacker needed
Victim opens malicious PDF; or visits malicious site if plugin enabled
The fix
The vulnerability was fixed in a vendor patch released on 2018-04-19.
How it was found
- Create a PDF file with a Catalog dictionary containing an /AF array that references an object.
- Make the referenced object malformed by including a stray /F string, so it is not a valid FileSpec.
- Open the PDF in Foxit PDF Reader; the parser will treat the malformed object as a FileSpec and cause an out-of-bounds read.
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 bug is a type confusion, where the program treats a chunk of memory as one kind of object but it was actually created as a different, smaller type. When the program tries to read a field that doesn't exist in the smaller object, it reads past the end of the allocated memory, which can crash the program or leak data. An attacker can trigger this by sending a specially crafted PDF file that the victim opens.
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.