Adobe Acrobat Reader DC Collab newWrStreamToCosObj Remote Code Execution Vulnerability
A crafted JavaScript snippet embedded in a PDF causes a use-after-free in Adobe Acrobat Reader DC's Collab JavaScript API, where an object is freed and then dereferenced. With careful memory layout control an attacker could turn this into arbitrary code execution when the victim opens the malicious file or page.
Originally disclosed on Cisco Talos
A specific JavaScript code embedded in a PDF file can lead to an object type confusion when opening a PDF document in Adobe Acrobat Reader DC 2018.011.20038. 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 caching flaw in Acrobat's JavaScript engine: an object created by one Collab call is freed during a later call, but a cached pointer to it is still dereferenced.
Impact
With careful memory manipulation this could lead to arbitrary code execution, though the triggering method call is privileged and only callable from trusted functions or locations.
What the attacker needed
Victim opens a malicious PDF; victim visits a malicious web page; privileged method call from trusted context
How it was found
- Embed the JavaScript in a PDF and open it in the affected reader.
- Call the Collab method that creates the stream object.
- Call getInitiatorSource, which frees that object while a cached pointer remains.
- Observe the freed object being dereferenced, giving a crash or potential control of 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 can contain small programs written in JavaScript, and this reader runs them. A bug in the reader frees a piece of memory but keeps using it afterwards, so an attacker who controls what lands in that memory could make the program run their own code. The victim only has to open a malicious PDF or visit a malicious page.
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.