Jara Multiple Cross-Site Scripting and SQL Injection Vulnerabilities


Description   Multiple vulnerabilities have been discovered in Jara, which can be exploited by malicious users to conduct SQL injection attacks and by malicious people to conduct cross-site scripting and SQL injection attacks.
1) Input passed via the "id" parameter to view.php is not properly sanitised in the "jara_write_post()" function in include/templating_fns.php before being used in an SQL query. This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.
2) Input passed via the "term" parameter to search.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.
3) Input passed via the "id" parameter to category.php is not properly sanitised before being used in an SQL query. This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.
4) Input passed via the "username" and "password" parameters to login.php (when "loginaction" is set) is not properly sanitised in the "jara_user_authenticate()" function in include/auth_fns.php before being used in an SQL query. This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.
5) Input passed via multiple parameters to multiple scripts is not properly sanitised before being used in an SQL query. This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.
List of affected scripts and parameters:
<a href="http://[host]/admin/delete_page.php?id
" target="_blank">http://[host]/admin/delete_page.php?id
</a>
<a href="http://[host]/admin/delete_post.php?id
" target="_blank">http://[host]/admin/delete_post.php?id
</a>
<a href="http://[host]/admin/delete_category.php?id
" target="_blank">http://[host]/admin/delete_category.php?id
</a>
<a href="http://[host]/admin/edit_page.php?id
" target="_blank">http://[host]/admin/edit_page.php?id
</a>
<a href="http://[host]/admin/edit_post.php?id
" target="_blank">http://[host]/admin/edit_post.php?id
</a>
Note: The vulnerabilities #1 and #3 through #5 can further be exploited to conduct cross-site scripting attacks via SQL error messages.
The vulnerabilities are confirmed in version 1.6. Other versions may also be affected.
     
Vulnerable Products   Vulnerable Software:
Jara 1.x
     
Solution   No official solution is currently available.
     
CVE  
     
References   Or4nG.M4n:
http://www.exploit-db.com/exploits/18069/
NS-12-009:
http://www.mavitunasecurity.com/xss-and-sql-injection-vulnerabilities-in-jara/
     
Vulnerability Manager Detection   No
     
IPS Protection  
ASQ Engine alarm Available Since
SQL injection Prevention - GET : suspicious OR statement 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
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
SQL injection Prevention - GET : suspicious UPDATE SET statement in URL
3.2.0
SQL injection Prevention - GET : suspicious SELECT statement in URL
3.2.0
SQL injection Prevention - GET : suspicious INSERT statement 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
SQL injection Prevention - GET : block comment delimiters in URL
3.2.0
SQL injection Prevention - GET : suspicious SQL statement in header
4.0.0
     


 
 
 
 
 Risk level 
Moderate 

 Vulnerability First Public Report Date 
2011-10-24 

 Target Type 
Server 

 Possible exploit 
Remote