Posnic Stock Management System Cross-Site Scripting and SQL Injection Vulnerabilities


Description   Sarahma Security has discovered multiple vulnerabilities in Posnic Stock Management System, which can be exploited by malicious people to conduct cross-site scripting and SQL injection attacks.
1) Input passed via multiple parameters to multiple scripts is not properly sanitised before being used in SQL queries. This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.
List of affected scripts and parameters:
<a href="http://site/change_password.php?confirm_pass=1&new_pass=1&old_pass (POST)
" target="_blank">http://site/change_password.php?...pass=1&old_pass (POST)
</a>
<a href="http://site/forget_pass.php?name (POST)
" target="_blank">http://site/forget_pass.php?name (POST)
</a>
<a href="http://site/update_sales.php?sid
" target="_blank">http://site/update_sales.php?sid
</a>
<a href="http://site/update_customer_details.php?sid
" target="_blank">http://site/update_customer_details.php?sid
</a>
<a href="http://site/update_purchase.php?sid
" target="_blank">http://site/update_purchase.php?sid
</a>
<a href="http://site/update_supplier.php?sid
" target="_blank">http://site/update_supplier.php?sid
</a>
<a href="http://site/update_stock.php?sid
" target="_blank">http://site/update_stock.php?sid
</a>
<a href="http://site/update_payment.php?sid
" target="_blank">http://site/update_payment.php?sid
</a>
<a href="http://site/view_sales.php?Search=1&searchtxt (POST)
" target="_blank">http://site/view_sales.php?Search=1&searchtxt (POST)
</a>
<a href="http://site/view_customers.php?Search=1&searchtxt (POST)
" target="_blank">http://site/view_customers.php?Search=1&searchtxt (POST)
</a>
<a href="http://site/view_purchase.php?Search=1&searchtxt (POST)
" target="_blank">http://site/view_purchase.php?Search=1&searchtxt (POST)
</a>
<a href="http://site/view_supplier.php?Search=1&searchtxt (POST)
" target="_blank">http://site/view_supplier.php?Search=1&searchtxt (POST)
</a>
<a href="http://site/view_product.php?Search=1&searchtxt (POST)
" target="_blank">http://site/view_product.php?Search=1&searchtxt (POST)
</a>
<a href="http://site/view_payments.php?Search=1&searchtxt (POST)
" target="_blank">http://site/view_payments.php?Search=1&searchtxt (POST)
</a>
2) Input passed via the "msg" GET parameter to forget_pass.php and to index.php is not properly sanitised before being returned to the user. This can be exploited to execute arbitrary HTML and script code in a user's browser session in context of an affected site.
The vulnerabilities are confirmed in version 1.02. Other versions may also be affected.
     
Vulnerable Products   Vulnerable Software:
Posnic Stock Management System 1.x
     
Solution   No official solution is currently available.
     
CVE  
     
References   SGI-1309003:
http://www.sarahma.co.id/posnic-stock-management-system-1-02-multiple-vulnerability/
     
Vulnerability Manager Detection   No
     
IPS Protection  
ASQ Engine alarm Available Since
XSS - Prevention - GET : suspicious 'iframe' tag found in URL
3.2.0
XSS - Prevention - GET : suspicious 'meta' tag found in URL
3.2.0
SQL injection Prevention - GET : suspicious OR statement in URL
3.2.0
XSS - Prevention - GET : suspicious tag with event found in URL
3.2.0
XSS - Prevention - GET : suspicious 'applet' tag found in URL
3.2.0
SQL injection Prevention - GET : suspicious combination of 'OR' or 'AND' statements in URL
3.2.0
SQL injection Prevention - GET : suspicious CREATE statement in URL
3.2.0
SQL injection Prevention - GET : suspicious CAST statement in URL
3.2.0
SQL injection Prevention - GET : suspicious OPENROWSET statement in URL
3.2.0
SQL injection Prevention - GET : suspicious DECLARE statement in URL
3.2.0
XSS - Phishing : suspicious 'div' tag found in URL
3.2.0
XSS - Prevention - GET : suspicious 'style' attribute found in URL
3.2.0
XSS - Prevention - GET : suspicious 'img' tag found in URL
3.2.0
SQL injection Prevention - GET : suspicious OPENQUERY statement in URL
3.2.0
SQL injection Prevention - GET : suspicious shutdown statement in URL
3.2.0
SQL injection Prevention - GET : suspicious UNION SELECT statement in URL
3.2.0
SQL injection Prevention - GET : possible database version probing
3.2.0
XSS - Phishing : suspicious 'a' tag found in URL
3.2.0
XSS - Prevention - GET : cookie access attempt using script language found in URL
3.2.0
SQL injection Prevention - GET : suspicious UPDATE SET statement in URL
3.2.0
XSS - Prevention - GET : suspicious 'embed' tag found in URL
3.2.0
XSS - Prevention - GET : suspicious 'object' tag found in URL
3.2.0
SQL injection Prevention - GET : suspicious SELECT statement in URL
3.2.0
XSS - Phishing : suspicious 'form' tag found in URL
3.2.0
SQL injection Prevention - GET : suspicious INSERT statement in URL
3.2.0
XSS - Prevention - GET : javascript code found in URL
3.2.0
SQL injection Prevention - GET : suspicious DROP statement in URL
3.2.0
SQL injection Prevention - GET : suspicious EXEC statement in URL
3.2.0
XSS - Prevention - GET : evasion attempt using tag characters encoding in URL
3.2.0
SQL injection Prevention - GET : block comment delimiters in URL
3.2.0
XSS - Prevention - GET : suspicious 'style' tag found in URL
3.2.0
XSS - Phishing : suspicious 'link' tag found in URL
3.2.0
XSS - Prevention - GET : 'script' tag found in URL
3.2.0
XSS - Prevention - GET : 'location' javascript object found in URL
3.2.0
XSS - Prevention - GET : suspicious 'div' tag found in URL
3.2.0
SQL injection Prevention - GET : suspicious SQL statement in header
4.0.0
SQL injection Prevention - GET : Evasion attempt with CAST and EXEC statements
5.0.0
SQL injection Prevention - GET : Authentication bypass attempt with OR statement
5.0.0
     


 
 
 
 
 Risk level 
Moderate 

 Vulnerability First Public Report Date 
2013-10-02 

 Target Type 
Server 

 Possible exploit 
Remote