Skip to content
Memory corruption Advisory Advanced CVE-2021-44710

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.

Jaewon Min Follow

Originally disclosed on Cisco Talos

High 8.8 View original

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.

Jaewon Min and Aleksandar Nikolic, on Cisco Talos

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

  1. Create a PDF with a text field that has richText and defaultValue set.
  2. Install a Keystroke event handler on the text field that assigns event.richValue = app.activeDocs[0].
  3. Call resetForm(true) on app.activeDocs[0] to trigger the Keystroke action and execute the handler.
  4. 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.

More by Jaewon Min

View all

1 more disclosed report, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.