kirilkirkov / Ecommerce-CodeIgniter-Bootstrap

Responsive, Multi-Vendor, MultiLanguage Online Store Platform (shopping cart solution)
MIT License
1.26k stars 942 forks source link

XSS vulnerabilities #219

Closed chluo1997 closed 2 years ago

chluo1997 commented 2 years ago

We found multiple XSS vulnerabilities in the latest version of Ecommerce-CodeIgniter-Bootstrap.

Technique details: The vulnerabilities occur at base_url() function. We notice the user inputs (e.g., $_POST) are used as the parameter of base_url() function in many places (e.g., the 45th line in /application/modules/admin/views/blog/blogpublish.php), the program echo the return value of this function directly without proper sanitization. This would lead to XSS vulnerabilities.

Example: We exploit the echo function in /application/modules/admin/views/blog/blogpublish.php#45 line. The attacker can set $_POST['img'] to 'q" onerror="javascript:alert(1)'. Then the img tag becomes Then he successfully performs a XSS attack.

Ecommerce-xss

The vulnerability has been fixed in 56465f after we reported it to developers.