Adobe Acrobat Reader DC text field value remote code execution vulnerability — redux
A JavaScript regular expression with a large array in a PDF form field triggers an integer sign extension error, causing heap corruption. An attacker could exploit this to achieve arbitrary code execution when the victim opens the 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 an integer sign extension error in a size comparison, allowing a loop to write beyond the allocated buffer.
Impact
Could lead to arbitrary code execution if the attacker carefully manipulates memory, but the report only demonstrates a crash.
What the attacker needed
Victim opens malicious PDF; Adobe Acrobat Reader DC 2019.010.20069
The fix
The vulnerability was not properly patched to cover all cases; it should be fixed by correcting the sign extension in the size comparison.
How it was found
- Create a PDF with a JavaScript regular expression built from a large array (over 32769 elements).
- Assign that regular expression to a form field value.
- Open the PDF in Adobe Acrobat Reader DC to trigger the heap corruption.
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 you open it. A mistake in how Adobe Reader handles a large regular expression (a pattern used for matching text) lets an attacker write data past the end of a memory buffer. This can crash the program or, with careful setup, let the attacker run their own code.
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.