macOS Atlassian Companion Remote Code Execution
The Atlassian Companion app on macOS checked downloaded file extensions against a blocklist, but the Java class extension was only listed for Windows, so it was allowed on macOS. An attacker could upload a malicious class file to Confluence and get code executed on a victim's machine when the victim clicked Edit.
Published on wojciechregula.blog
I identified a vulnerability that allowed executing code on victims’ machines after they click the Edit button on a Confluence page when Atlassian Companion is installed on macOS.
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
Code could be executed on the victim's macOS machine, but only if Companion and Java are installed and the victim clicks Edit.
What the attacker needed
Atlassian Companion installed; Java installed; victim clicks Edit on a Confluence page
The fix
The class file extension is now blocked on macOS as well.
How it was found
- Create a malicious Java file that runs a command when executed.
- Compile it into a class file.
- Upload the class file to Confluence.
- Have the victim click the Edit button so Companion downloads and opens it, running the code.
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 write-up has not been written yet. The Original tab links to the source.
The Companion app downloads a file from Confluence and opens it on your computer, but first it checks the file's ending (its extension) against a list of dangerous ones. The list for Mac computers forgot to include Java class files, which are small programs. So a file that runs code could slip through and run when someone pressed Edit.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.