
Python exploit for CVE-2023-32315, a path traversal in Openfire's admin console, allowing unauthenticated access to restricted pages. Includes Docker setup and a management plugin for post-exploitation.
⚠️ For educational and authorized security research purposes only
Very grateful to the original PoC author phith0n and K3ysTr0K3R
Openfire is an XMPP server licensed under the Open Source Apache License. Openfire's administrative console, a web-based application, was found to be vulnerable to a path traversal attack via the setup environment. This permitted an unauthenticated user to use the unauthenticated Openfire Setup Environment in an already configured Openfire environment to access restricted pages in the Openfire Admin Console reserved for administrative users. This vulnerability affects all versions of Openfire that have been released since April 2015, starting with version 3.10.0. The problem has been patched in Openfire release 4.7.5 and 4.6.8, and further improvements will be included in the yet-to-be released first version on the 4.8 branch (which is expected to be version 4.8.0). Users are advised to upgrade. If an Openfire upgrade isn’t available for a specific release, or isn’t quickly actionable, users may see the linked github advisory (GHSA-gw42-f939-fhvm) for mitigation advice.
First, clone the repository
git clone https://github.com/asepsaepdin/CVE-2023-32315.git
Change directory
cd CVE-2023-32315
Let the container spin up
docker compose up
Run the python script CVE-2023-32315.py to exploit the host http://127.0.0.1:9090
python3 CVE-2023-32315.py -u http://localhost:9090
Then log in to the admin console with this account, and you can see that hugme is already an administrator.
Go to tab plugin > upload plugin openfire-management-tool-plugin.jar
Go to tab server > server settings > Management tool
Access websehll with password "123"
Go to ‘system command’ and utilize as if it’s the command line, only use one command at a time