Adobe Acrobat Reader DC AcroForm PDFDocEncoding Remote Code Execution Vulnerability
A malformed PDF with an AcroForm encoding object can cause an out-of-bounds pointer offset, leading to arbitrary memory write and potential code execution. An attacker could exploit this by tricking a victim into opening a malicious PDF or visiting a malicious web page.
Originally disclosed on Cisco Talos
An exploitable case of parser confusion can lead to invalid pointer arithmetic in part of code responsible for parsing AcroForm forms in the Adobe Acrobat Reader DC 2017.009.20044. A specially crafted PDF file can abuse this unchecked pointer arithmetic to access and overwrite arbitrary memory in the process…
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 parser fails to validate that the base encoding is compatible with PDFDocEncoding, allowing a differences offset to be used directly as a pointer offset in a memory write instruction.
Impact
An attacker could achieve arbitrary code execution by manipulating the process through repeated arbitrary writes, though the victim must open a malicious file or access a malicious web page.
What the attacker needed
Victim opens a malicious PDF; or victim visits a malicious web page
How it was found
- Create a PDF with an AcroForm resource dictionary that references a PDFDocEncoding object.
- In that encoding object, set the base encoding to WinAnsiEncoding and include a Differences array with a large negative offset value.
- Open the PDF in Adobe Acrobat Reader DC; the offset is used as a pointer offset in a memory write, causing an out-of-bounds write.
- Add more entries to the Differences array to repeat the out-of-bounds write as many times as needed.
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.
This report describes a bug in Adobe Acrobat Reader, a program for viewing PDF files. A specially made PDF can confuse the program into writing data to the wrong place in its memory, which can let an attacker run their own code on the victim's computer. The victim just has to open the PDF or visit a web page that loads it.
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.