Skip to content
Memory corruption Advisory Advanced CVE-2023-32616

Foxit Reader 3D Annot use-after-free vulnerability

A use-after-free vulnerability in Foxit Reader's handling of 3D annotations allows a specially crafted PDF with JavaScript to free an annotation object and later use it without validation, leading to memory corruption and potential arbitrary code execution. An attacker could exploit this by tricking a user into opening a malicious PDF or visiting a malicious site if the browser plugin is enabled.

Kamlapati Choubey Follow

Originally disclosed on Cisco Talos

High 8.8 View original

A use-after-free vulnerability exists in the way Foxit Reader 12.1.2.15356 handles 3D annotations. A specially crafted Javascript code inside a malicious PDF document can trigger reuse of a previously freed object, which can lead to memory corruption and result in arbitrary code execution.

Kamlapati Choubey, 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 the application frees a 3D annotation object via deletePages() and later uses it without checking if it is still valid.

What the attacker needed

Victim opens malicious PDF; or victim visits malicious site with plugin

The fix

The vulnerability was fixed by the vendor in a patch release.

How it was found

  1. Create a PDF with JavaScript that sets the page number to a page containing a 3D annotation and calls deletePages().
  2. The deletePages() function frees the 3D annotation object.
  3. Later, the freed object is used without validation, leading to 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 bug 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 3D annotation object when pages are deleted, but later tries to use it, which can crash the program or let an attacker run their own code. The attacker needs the victim 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.

More by Kamlapati Choubey

View all

8 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.