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

Foxit Reader checkbox Calculate use-after-free vulnerability

Foxit Reader's JavaScript API for form fields frees a checkbox field object when a Calculate action calls deletePages, then later uses that freed object without validation. An attacker who gets a victim to open a crafted PDF could trigger memory corruption and potentially achieve arbitrary code execution.

KPC Follow

Originally disclosed on Cisco Talos

High 8.8 View original

A use-after-free vulnerability exists in the way Foxit Reader 2024.1.0.23997 handles a checkbox 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.

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

Impact

Could lead to memory corruption and arbitrary code execution if the user opens a malicious PDF, or visits a malicious site when the browser plugin is enabled.

What the attacker needed

Victim opens a malicious PDF; JavaScript enabled in the reader; or browser plugin enabled for web vector

How it was found

  1. Create a checkbox field via the JavaScript addField API.
  2. Assign a Calculate action to a text field that calls deletePages.
  3. Add a second field, which triggers the Calculate callback and frees the checkbox object.
  4. The freed checkbox object is then used, causing an access violation.

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 throws away an object in memory but keeps a pointer to it and later uses that pointer again. Here, a PDF's JavaScript deletes pages (which frees a form field) and then the reader still touches the freed field, which can crash or let an attacker control what happens next. The victim only has to open a malicious PDF.

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.