Adobe Acrobat Reader Annotation Object Page Race Condition Vulnerability
A time-of-check time-of-use race condition in Adobe Acrobat Reader's handling of annotation page properties allows a malicious PDF with JavaScript to cause memory corruption. An attacker could exploit this to achieve arbitrary code execution by tricking a user into opening the file.
A time-of-check time-of-use vulnerability exists in Adobe Acrobat Reader 2024.002.20759. A specially crafted Javascript code inside a malicious PDF document can trigger memory corruption due to a race condition which could result in 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 page number of an annotation is read twice without locking, and JavaScript can change it between the check and the use, leading to an out-of-bounds write.
Impact
Depending on memory layout, this could allow arbitrary read and write, potentially leading to arbitrary code execution.
What the attacker needed
Victim opens malicious PDF; JavaScript enabled in PDF reader
The fix
The vendor released a patch on 2024-08-13.
How it was found
- Open a PDF containing the malicious JavaScript in Adobe Acrobat Reader.
- The JavaScript triggers a call to AnnotsExportNotes.
- The function allocates a buffer based on the total page count.
- It loops over annotations, reading each page number and storing sizes.
- It allocates per-page annotation buffers.
- It loops again, but the page number may have changed, causing an out-of-bounds write.
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 race condition is when a program checks something and then uses it later, but the thing changes in between. Here, the page number of an annotation is checked, then used, but JavaScript can change it in the meantime, causing the program to write to the wrong memory. This can crash the program or let an 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.