Foxit Reader Text Widget Format Use-After-Free Vulnerability
A use-after-free vulnerability exists in Foxit Reader when handling a Text Widget field object. A specially crafted JavaScript inside a malicious PDF can trigger memory corruption, potentially leading to arbitrary code execution.
A use-after-free vulnerability exists in the way Foxit Reader handles a Text Widget field object. 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 application frees a Text Widget object via deletePages() and then accesses it without validating that it is still allocated.
Impact
This could lead to memory corruption and potentially arbitrary code execution, but the text notes that exploitation depends on the memory layout.
What the attacker needed
Victim opens a malicious PDF; JavaScript enabled in Foxit Reader
The fix
The vulnerability was fixed in a vendor patch release.
How it was found
- Open a malicious PDF containing JavaScript that sets up a Text Widget and a Format action.
- Trigger the Format action by focusing the Text Widget, which calls deletePages() and frees the object.
- The freed object is later accessed, causing a crash or potential 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 happens when a program frees memory but then keeps using it, like deleting a file and then trying to open it. In this case, Foxit Reader frees a form field object but later accesses it, which can crash the program or let an attacker run their own code. The attacker needs to trick a user into opening 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.