Nitro Pro PDF Object Stream Parsing Number of Objects Remote Code Execution Vulnerability
An integer overflow in Nitro Pro's PDF object stream parsing leads to an undersized buffer allocation, and a subsequent write outside the buffer can cause memory corruption and potentially code execution. A specially crafted PDF can trigger this when opened by a victim.
Originally disclosed on Cisco Talos
An exploitable vulnerability exists in the object stream parsing functionality of Nitro Software, Inc.’s Nitro Pro 13.13.2.242 when updating its cross-reference table. When processing an object stream from a PDF document, the application will perform a calculation in order to allocate memory for the list of indirect…
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
The application multiplies the number of indirect objects by 16 without checking for integer overflow, leading to a small allocation that is then overflowed by a memset using the original large size.
Impact
This could lead to code execution under the context of the application.
What the attacker needed
Victim opens a crafted PDF
How it was found
- Craft a PDF document containing an object stream with a large value for the number of indirect objects.
- Open the crafted PDF in Nitro Pro.
- The application parses the object stream and calculates the allocation size, which overflows.
- An undersized buffer is allocated and then written past its bounds, causing memory corruption.
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.
When a PDF file is opened, the program reads a list of objects and calculates how much memory to reserve for them. If the number of objects is very large, the calculation can wrap around to a small number, so the program reserves too little memory. Later, when it tries to use that memory, it writes past the end, which can crash the program or let an attacker run their own 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.