Skip to content
Memory corruption Advisory Advanced CVE-2024-47810

Foxit Reader 3D Page Object Use-After-Free Vulnerability

A use-after-free vulnerability in Foxit Reader's handling of a 3D page object allows a specially crafted PDF with JavaScript to free a page object while a reference remains in a 3D object, 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 with the browser plugin enabled.

KPC Follow

Originally disclosed on Cisco Talos

High 8.8 View original

A use-after-free vulnerability exists in the way Foxit Reader 2024.3.0.26795 handles a 3D page 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.

KPC, 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 page object is freed by deletePages() but the reference to it inside the 3D object (CArtworkAnnot) is not cleared, leading to use of the dangling pointer.

Impact

This could lead to memory corruption and potentially arbitrary code execution, though exploitation depends on the memory layout.

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. Set the page number to 4 in the main function.
  2. Call deletePages(4) and then deletePages() to free the page object.
  3. Add a field to trigger further actions.
  4. The 3D object still holds a reference to the freed page object.
  5. When the 3D object is used, the freed pointer is dereferenced, causing a 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 use-after-free bug happens when a program frees memory but keeps using it, like deleting a file and then trying to open it. Here, Foxit Reader frees a page object but a 3D object still points to it, so when the program later uses that pointer, it can crash or be tricked into running attacker code. The attacker needs the victim to open a malicious PDF or visit a malicious site.

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 KPC

View all

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