Adobe Acrobat Reader Javascript event.richValue use-after-free vulnerability
A use-after-free vulnerability in Adobe Acrobat Reader's handling of the event.richValue property inside a Keystroke event handler allows an attacker to execute arbitrary code when a victim opens a malicious PDF file.
Originally disclosed on Cisco Talos
A use-after-free vulnerability exists in the way certain events are handled in Adobe Acrobat Reader 21.007.20091. A specially-crafted javascript code can exploit a use-after-free vulnerability which 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 the event handler's assignment to event.richValue causes an object to be freed while a pointer to it is still held and later dereferenced.
Impact
With careful memory manipulation, an attacker could gain control over the reused memory and achieve arbitrary code execution.
What the attacker needed
Victim opens a malicious PDF; Adobe Acrobat Reader 21.007.20091
How it was found
- Create a PDF with a text field that has richText and defaultValue set.
- Install a Keystroke event handler on the text field that assigns event.richValue = app.activeDocs[0].
- Call resetForm(true) on app.activeDocs[0] to trigger the Keystroke action and execute the handler.
- The handler causes a heap object to be freed and then reused, leading to a use-after-free.
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 use-after-free bug happens when a program frees some memory but then keeps using it, like deleting a file but leaving a shortcut to it. Here, Adobe Reader's JavaScript engine frees an object and then later reads from it, so an attacker who controls the memory in between can make the program run their own code. The victim just has to 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.