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

Foxit Reader Lock object fields property type confusion vulnerability

A type confusion flaw in Foxit Reader's handling of the Lock object's fields property allows a malicious PDF with JavaScript to cause memory corruption. An attacker could trick a user into opening the file to achieve arbitrary code execution.

KPC Follow

Originally disclosed on Cisco Talos

High 8.8 View original

A type confusion vulnerability vulnerability exists in the way Foxit Reader 2024.1.0.23997 handles a Lock 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 fields property of the Lock object is not type-checked after deletePages resets it to a different object, leading to a type confusion.

Impact

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

What the attacker needed

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

How it was found

  1. Create a PDF with JavaScript that adds a signature field and gets its Lock object.
  2. Call deletePages on the active document to free objects and reset the Lock's fields property.
  3. Define a getter for the fields property to trigger the type confusion when accessed.

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 type confusion bug means the program treats one kind of data as if it were another, like reading a number as if it were a text pointer. In Foxit Reader, a crafted PDF with JavaScript can make the Lock object's fields property point to the wrong kind of object after some pages are deleted. When the program later uses that property, it crashes or can be made to run attacker code.

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.