Skip to content
Memory corruption Advisory Advanced CVE-2019-5050

NitroPDF Page Kids Remote Code Execution Vulnerability

A crafted PDF can cause NitroPDF to misinterpret a /Page object as a /Pages object, leading to an out-of-bounds heap read and write. An attacker could potentially achieve arbitrary code execution by manipulating memory layout.

Aleksandar Nikolic Follow

Originally disclosed on Cisco Talos

High 8.8 View original

A specifically crafted PDF file can lead to a heap corruption when opened in NitroPDF 12.12.1.522. With careful memory manipulation, this can lead to arbitrary code execution.

Aleksandar Nikolic, 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 a parser confusion where a /Page object containing /Kids and /Count is treated as a /Pages object, causing an out-of-bounds heap access due to a mismatch between the declared count and actual objects.

Impact

This could potentially lead to arbitrary code execution if the attacker carefully controls memory layout, though the report only demonstrates a crash.

What the attacker needed

Victim opens a malicious PDF

How it was found

  1. Create a PDF with a /Pages object that points to a /Page object.
  2. In the /Page object, include /Kids and /Count fields with a count larger than the actual number of kids.
  3. Open the PDF in NitroPDF, causing a crash due to out-of-bounds memory access.

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 PDF file is made of objects that describe pages. NitroPDF confused one type of object for another, so it read and wrote memory outside the intended area. This could let an attacker run their own code on the victim's computer if the victim opens 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 Aleksandar Nikolic

View all

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