Nitro Pro PDF JavaScript TimeOutObject double free vulnerability
A double-free vulnerability exists in Nitro Pro PDF's JavaScript implementation when a TimeOutObject is created and the document is closed, causing the same reference to be released twice. An attacker could convince a user to open a specially crafted PDF to potentially execute code under the application's context.
An exploitable double-free vulnerability exists in the JavaScript implementation of Nitro Pro PDF. A specially crafted document can cause a reference to a timeout object to be stored in two different places.
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 stores the same private data object in two different places without reference counting, so when the TimeOut object is finalised it frees memory that is still referenced elsewhere.
Impact
This could lead to code execution under the context of the application, though the text does not demonstrate a full exploit.
What the attacker needed
Victim opens a malicious PDF; Nitro Pro PDF installed
How it was found
- Create a PDF document that calls app.setTimeOut with a callback and a timeout value.
- Open the document in Nitro Pro PDF, which registers the private data object with the HFT Extension Manager and also stores it in a global array.
- Close the document, triggering a notification that causes the TimeOut object to be finalised and its private data freed.
- The same private data is freed again because it is still referenced in the other location, resulting in a double 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 double-free happens when a program tries to free the same piece of memory twice. This can confuse the program and sometimes let an attacker run their own code. Here, opening a malicious PDF and then closing it triggers the bug.
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.