Exploits / Vulnerability Discovered : 2021-07-26 |
Type : webapps |
Platform : php
This exploit / vulnerability Xos shop 1.0.9 multiple arbitrary file deletion (authenticated) is for educational purposes only and if it is used you will do on your own risk!
# XOS-Shop is a further development of the well-known open source webshop system "osCommerce". The XOS-Shop prior to version 1.0.9 suffers from an arbitrary file deletion vulnerability in Admin Panel. Exploiting the vulnerability allows an authenticated attacker to delete any file in the web root (along with any other file on the server that the PHP process user has the proper permissions to delete). Furthermore, an attacker might leverage the capability of arbitrary file deletion to circumvent certain webserver security mechanisms such as deleting .htaccess file that would deactivate those security constraints.
##########
# PoC 1 #
##########
Vulnerable URL: http://localhost/xos_shop_v1.0.9/shop/admin/manufacturers.php
Vulnerable Code: line 66 - xos_shop_v1.0.9\shop\admin\manufacturers.php
Steps to Reproduce:
1. Login as admin
2. Goto Catalog > Manufacturers > edit any manufacturer
3. Upload any image as "Manufacturers Image" and click save button
4. Then, tick "Delete" checkbox and click save button
5. Intercept the request and replace existing image name to any files on the server via parameter "current_manufacturer_image".
# Assumed there is a backup.conf file in web root
PoC #1) param current_manufacturer_image - Deleting backup.conf file in web root
1. Login as admin
2. Goto Catalog > Categories/Products > edit any category
3. Upload any image as "Category Image" if there is no existing image and click save button else,
4. Tick "Delete" checkbox and click save button
5. Intercept the request and replace existing image name to any files on the server via parameter "current_category_image".
# Assumed there is a backup.conf file in web root
PoC #2) param current_category_image - Deleting backup.conf file in web root
# For more explanation, you can refer to the github issue on XOS-Shop via https://github.com/XOS-Shop/xos_shop_system/issues/1
# The affected version is prior to v1.0.9.
Xos shop 1.0.9 multiple arbitrary file deletion (authenticated)