Adobe Acrobat Reader DC Text Field Value Remote Code Execution Vulnerability
A JavaScript regular expression with a very large string value in a PDF form field triggers an integer sign-extension error, causing a heap buffer overflow. An attacker could exploit this to corrupt memory and potentially achieve arbitrary code execution when a victim opens a malicious PDF.
Originally disclosed on Cisco Talos
A specific JavaScript code embedded in a PDF file can lead to a heap corruption when opening a PDF document in Adobe Acrobat Reader DC 2019.8.20071. With careful memory manipulation, this can lead to arbitrary code execution.
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 signed 16-bit loop counter is sign-extended to 32 bits, turning a value of 0x8000 into a negative number and bypassing the loop bound check, leading to out-of-bounds memory access.
Impact
An attacker could cause heap corruption and potentially achieve arbitrary code execution, though the report only states this as a possibility.
What the attacker needed
Victim opens a malicious PDF; Adobe Acrobat Reader DC 2019.8.20071
How it was found
- Create a PDF with embedded JavaScript that builds a regular expression from a very large string.
- Assign that regular expression to a form field value.
- Open the PDF in Adobe Acrobat Reader DC 2019.8.20071.
- The script executes and triggers heap corruption, potentially leading to 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.
A PDF file can contain JavaScript that runs when the file is opened. In this case, a specially crafted script causes the PDF reader to write past the end of a memory buffer, which can crash the program or let an attacker run their own code. The victim just needs to open the malicious 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.