Adobe Acrobat Reader DC jpeg decoder Remote Code Execution Vulnerability
A use of uninitialized memory in Adobe Acrobat Reader's JPEG decoder leads to a heap-based buffer overflow, which can be exploited for remote code execution when a specially crafted PDF with an embedded JPEG is opened.
Originally disclosed on Cisco Talos
A use of uninitialized memory vulnerability exists in JPEG image file format decoding code of Adobe Acrobat Reader which ultimately leads to a heap-based buffer overflow which can be abused to achieve remote code execution. A specially crafted PDF file with an embedded JPEG can trigger this vulnerability when opened…
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 JPEG decoder uses uninitialized integer values from a malloc-allocated buffer to calculate a memcpy size, leading to an out-of-bounds write.
Impact
An attacker could achieve remote code execution by tricking a user into opening a malicious PDF, though with Page Heap disabled the uninitialized memory may be zero and not cause a crash.
What the attacker needed
Victim opens a malicious PDF; Adobe Acrobat Reader DC is used
The fix
The issue should be fixed by changing the allocation call from malloc to calloc, which zero-initializes memory.
How it was found
- Open a specially crafted PDF file containing an embedded JPEG image in Adobe Acrobat Reader DC.
- The JPEG decoder processes the image and uses uninitialized memory values.
- These values cause a memcpy call to write beyond the allocated heap buffer.
- The overflow can be exploited to achieve remote code execution.
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 program uses memory it hasn't properly set up, it can behave unpredictably. In this case, two numbers that were never given a value are used to decide how much data to copy, causing the program to write past the end of a buffer. An attacker can craft a PDF with a malicious JPEG image that triggers this, potentially allowing them to run their own code on the victim's computer.
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.