CVE202126084 Remote Code Execution on Confluence Servers
An unauthenticated OGNL injection in Confluence Server's Velocity templates allowed remote code execution. Attackers could execute arbitrary commands on the server.
github.com
Published on github.com
Raw
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
Root cause
Likely, user input was embedded into a Velocity template and evaluated as an OGNL expression without proper sanitisation, allowing expression injection.
Impact
An unauthenticated attacker could execute arbitrary commands on the Confluence server, leading to full compromise.
What the attacker needed
Confluence Server unpatched; No authentication required
How it was found
- Identify the vulnerable Velocity template file from the patch.
- Find the URL route that renders the template.
- Send a request with a parameter that breaks out of the single-quoted context using a unicode escape.
- Inject an OGNL expression to evaluate simple arithmetic, confirming injection.
- Bypass the isSafeExpression blacklist by accessing the class property via array accessor.
- Use Java reflection to execute arbitrary commands.
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.
This is a bug in a web application that lets an attacker run commands on the server without logging in. The attacker sends a specially crafted request that the server mistakenly evaluates as code, giving them control.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.