Skip to content
Memory corruption Advisory Advanced CVE-2021-21870

Foxit Reader FileAttachment annotation use-after-free vulnerability redux

A use-after-free vulnerability exists in the JavaScript engine of Foxit Reader 10.1.4.37651, allowing a specially crafted PDF to trigger reuse of freed memory and potentially achieve arbitrary code execution. An attacker must trick the user into opening a malicious file or site if the browser plugin extension is enabled.

Aleksandar Nikolic Follow

Originally disclosed on Cisco Talos

High 8.8 View original

A use-after-free vulnerability exists in the JavaScript engine of Foxit Software’s PDF Reader, version 10.1.4.37651. A specially crafted PDF document can trigger the reuse of previously free memory, which can lead to arbitrary code execution.

Aleksandar Nikolic, on Cisco Talos

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 a use-after-free in Foxit Reader's V8 JavaScript engine when handling FileAttachment annotations, where memory is freed but still referenced.

Impact

An attacker could execute arbitrary code on the victim's machine, but only if the user opens a malicious file or site and the browser plugin extension is enabled.

What the attacker needed

Victim opens malicious PDF or site; browser plugin extension enabled

The fix

The vulnerability was not actually fixed in version 10.1.4.37651 despite release notes claiming so; it should be properly fixed by addressing the use-after-free.

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 is a memory bug where a program keeps using a piece of memory after it has been freed, so an attacker can put their own data there and control what the program does. In this case, Foxit Reader's JavaScript engine can be tricked by a malicious PDF to run attacker code. The user must open the PDF or visit a malicious site if the browser plugin is enabled.

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.

More by Aleksandar Nikolic

View all

147 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.