Skip to content
Memory corruption Advisory Advanced CVE-2016-1681

Google Chrome PDFium jpeg2000 SIZ Code Execution Vulnerability

A heap buffer overflow exists in the openjpeg library used by Chrome's PDFium when parsing a JPEG2000 image with zero components in its SIZ marker. An attacker could serve a malicious PDF to potentially achieve arbitrary code execution.

Aleksandar Nikolic Follow

Originally disclosed on Cisco Talos

Medium 6.3 View original

An exploitable heap buffer overflow vulnerability exists in the Pdfium PDF reader included in the Google Chrome web browser. A specially crafted PDF document with embedded jpeg2000 image can cause a heap buffer overflow potentially resulting in an 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, the code fails to validate that the number of components is non-zero before allocating a buffer, and release builds omit the assert that would catch this, leading to a heap overflow when the buffer is later written to.

Impact

An attacker could potentially achieve arbitrary code execution by convincing a victim to open a malicious PDF, though the report only demonstrates a crash and does not provide a full exploit.

What the attacker needed

Victim opens a malicious PDF; Chrome release build (asserts omitted)

How it was found

  1. Create a JPEG2000 image with a truncated SIZ marker specifying zero components.
  2. Embed the image inside a PDF file.
  3. Open the PDF in a vulnerable version of Chrome or PDFium.
  4. The application crashes due to heap corruption or buffer overflow.

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 can contain images in a format called JPEG2000. The code that reads these images has a bug: if the image claims to have zero parts (components), it allocates a tiny buffer and then writes more data than fits, corrupting memory. This could let an attacker run their own code on your computer if you 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 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.