Dolibarr ERP/CRM Multiple Cross-Site Scripting, Script Insertion, and SQL Injection Vulnerabilities


Description   Multiple vulnerabilities have been reported in Dolibarr CMS, which can be exploited by malicious users to conduct script insertion and SQL injection attacks and by malicious people to conduct cross-site scripting attacks.
1) Input passed via the "entity" POST parameter to user/fiche.php (when "action" is set to "update", "save" is set to "Save", and "id", "lastname", "photo", "firstname", "job", "login", "password", "admin", "superadmin", "office_phone", "user_mobile", "office_fax", "email", "signature", "accountancy_code", and "token" are set) is not properly sanitised before being used in a SQL query. This can be exploited to manipulate SQL queries by injecting arbitrary SQL code.
2) Input passed via multiple parameters to multiple scripts 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.
List of affected scripts and parameters:
<a href="http://[host]/index.php?mainmenu=home&dol_hide_leftmenu
" target="_blank">http://[host]/index.php?mainmenu=home&dol_hide_leftmenu
</a>
<a href="http://[host]/index.php?mainmenu=home&dol_use_jmobile
" target="_blank">http://[host]/index.php?mainmenu=home&dol_use_jmobile
</a>
<a href="http://[host]/index.php?mainmenu=home&dol_optimize_smallscreen
" target="_blank">http://[host]/index.php?mainmenu...mp;dol_optimize_smallscreen
</a>
<a href="http://[host]/index.php?mainmenu=home&dol_no_mouse_hover
" target="_blank">http://[host]/index.php?mainmenu=home&dol_no_mouse_hover
</a>
<a href="http://[host]/index.php?mainmenu=home&dol_hide_topmenu
" target="_blank">http://[host]/index.php?mainmenu=home&dol_hide_topmenu
</a>
<a href="http://[host]/index.php?leftmenu=&optioncss=print&mainmenu
" target="_blank">http://[host]/index.php?leftmenu...ptioncss=print&mainmenu
</a>
<a href="http://[host]/user/logout.php?dol_hide_leftmenu
" target="_blank">http://[host]/user/logout.php?dol_hide_leftmenu
</a>
<a href="http://[host]/user/logout.php?dol_use_jmobile
" target="_blank">http://[host]/user/logout.php?dol_use_jmobile
</a>
<a href="http://[host]/user/logout.php?dol_optimize_smallscreen
" target="_blank">http://[host]/user/logout.php?dol_optimize_smallscreen
</a>
<a href="http://[host]/user/logout.php?dol_no_mouse_hover
" target="_blank">http://[host]/user/logout.php?dol_no_mouse_hover
</a>
<a href="http://[host]/user/logout.php?dol_hide_topmenu
" target="_blank">http://[host]/user/logout.php?dol_hide_topmenu
</a>
<a href="http://[host]/viewimage.php?entity=1&file=2&cache=0&modulepart
" target="_blank">http://[host]/viewimage.php?enti...&cache=0&modulepart
</a>
<a href="http://[host]/viewimage.php?entity=1&modulepart=userphoto&cache=0&file
" target="_blank">http://[host]/viewimage.php?enti...rphoto&cache=0&file
</a>
<a href="http://[host]/user/index.php?dol_hide_leftmenu
" target="_blank">http://[host]/user/index.php?dol_hide_leftmenu
</a>
<a href="http://[host]/user/index.php?dol_use_jmobile
" target="_blank">http://[host]/user/index.php?dol_use_jmobile
</a>
<a href="http://[host]/user/index.php?dol_optimize_smallscreen
" target="_blank">http://[host]/user/index.php?dol_optimize_smallscreen
</a>
<a href="http://[host]/user/index.php?dol_no_mouse_hover
" target="_blank">http://[host]/user/index.php?dol_no_mouse_hover
</a>
<a href="http://[host]/user/index.php?dol_hide_topmenu
" target="_blank">http://[host]/user/index.php?dol_hide_topmenu
</a>
3) Input passed via the Email, First Name, Last Name, Login, and Job fields in the User Card form is not properly sanitised before being used. This can be exploited to insert arbitrary HTML and script code, which will be executed in a user's browser session in context of an affected site if malicious data is viewed.
The vulnerabilities are reported in version 3.5.3. Prior versions may also be affected.
     
Vulnerable Products   Vulnerable Software:
Dolibarr ERP/CRM 3.x
     
Solution   Update to version 3.5.4.
     
CVE  
     
References   Dolibarr:
http://www.dolibarr.org/88-news/169-dolibarr-erp-crm-3-5-4-maintenance-release-for-branch-3-5-is-available
Deepak Rathore:
http://www.exploit-db.com/exploits/34007/
     
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
XSS - Prevention - POST : suspicious tag with event found in data
3.2.0
XSS - Prevention - GET : suspicious tag with event found in URL
3.2.0
XSS - Prevention - POST : suspicious 'meta' tag found in data
3.2.0
SQL injection Prevention - POST : suspicious SELECT statement in data
3.2.0
XSS - Prevention - POST : suspicious 'object' tag found in data
3.2.0
XSS - Prevention - GET : suspicious 'applet' tag found in URL
3.2.0
SQL injection Prevention - POST : possible version probing in data
3.2.0
XSS - Prevention - POST : suspicious 'applet' tag found in data
3.2.0
SQL injection Prevention - POST : suspicious OPENQUERY statement in data
3.2.0
SQL injection Prevention - POST : suspicious CREATE statement in data
3.2.0
XSS - Prevention - POST : 'location' javascript object found in data
3.2.0
SQL injection Prevention - POST : suspicious UPDATE statement in data
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 - POST : javascript code found in data
3.2.0
XSS - Prevention - POST : suspicious 'iframe' tag found in data
3.2.0
XSS - Prevention - GET : suspicious 'img' tag found in URL
3.2.0
SQL injection Prevention - POST : suspicious UNION statement in data
3.2.0
XSS - Prevention - POST : code allowing cookie access found in data
3.2.0
XSS - Prevention - POST : suspicious 'img' attribute found in data
3.2.0
SQL injection Prevention - POST : suspicious DROP statement in data
3.2.0
SQL injection Prevention - POST : suspicious INSERT statement in data
3.2.0
SQL injection Prevention - POST : suspicious OR statement in data
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
XSS - Prevention - GET : suspicious 'embed' tag found in URL
3.2.0
SQL injection Prevention - POST : suspicious EXEC statement in data
3.2.0
XSS - Prevention - GET : suspicious 'object' tag found in URL
3.2.0
XSS - Phishing : suspicious 'form' tag found in URL
3.2.0
XSS - Prevention - POST : suspicious 'embed' tag found in data
3.2.0
XSS - Prevention - POST : suspicious 'style' tag found in data
3.2.0
XSS - Prevention - GET : javascript code found in URL
3.2.0
SQL injection Prevention - POST : suspicious OPENROWSET statement in data
3.2.0
XSS - Prevention - POST : suspicious 'div' tag found in data
3.2.0
XSS - Prevention - GET : evasion attempt using tag characters encoding in URL
3.2.0
XSS - Prevention - GET : suspicious 'style' tag found in URL
3.2.0
SQL injection Prevention - POST : suspicious DECLARE statement in data
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 - POST : 'script' tag found in data
3.2.0
XSS - Prevention - POST : suspicious 'style' attribute found in data
3.2.0
XSS - Prevention - GET : 'location' javascript object found in URL
3.2.0
SQL injection Prevention - POST : suspicious HAVING statement in data
3.2.0
SQL injection Prevention - POST : suspicious CAST statement in data
3.2.0
XSS - Prevention - GET : suspicious 'div' tag found in URL
3.2.0
XSS - Prevention - POST : suspicious 'style' tag found in data
5.0.0
XSS - Prevention - POST : javascript code found in data
5.0.0
XSS - Prevention - POST : suspicious tag with event found in data
5.0.0
SQL injection Prevention - POST : suspicious UPDATE statement in data
5.0.0
XSS - Prevention - POST : suspicious 'embed' tag found in data
5.0.0
SQL injection Prevention - POST : suspicious SELECT statement in data
5.0.0
XSS - Prevention - POST : 'location' javascript object found in data
5.0.0
SQL injection Prevention - POST : suspicious DECLARE statement in data
5.0.0
SQL injection Prevention - POST : suspicious OPENROWSET statement in data
5.0.0
SQL injection Prevention - POST : suspicious OPENQUERY statement in data
5.0.0
XSS - Prevention - POST : code allowing cookie access found in data
5.0.0
SQL injection Prevention - POST : suspicious CAST statement in data
5.0.0
SQL injection Prevention - POST : suspicious EXEC statement in data
5.0.0
SQL injection Prevention - POST : suspicious CREATE statement in data
5.0.0
SQL injection Prevention - POST : suspicious INSERT statement in data
5.0.0
XSS - Prevention - POST : 'script' tag found in data
5.0.0
SQL injection Prevention - POST : suspicious DROP statement in data
5.0.0
XSS - Prevention - POST : suspicious 'style' attribute found in data
5.0.0
SQL injection Prevention - POST : suspicious HAVING statement in data
5.0.0
XSS - Prevention - POST : suspicious 'applet' tag found in data
5.0.0
SQL injection Prevention - POST : suspicious UNION statement in data
5.0.0
XSS - Prevention - POST : suspicious 'div' tag found in data
5.0.0
SQL injection Prevention - POST : suspicious OR statement in data
5.0.0
XSS - Prevention - POST : suspicious 'img' attribute found in data
5.0.0
XSS - Prevention - POST : suspicious 'meta' tag found in data
5.0.0
XSS - Prevention - POST : suspicious 'object' tag found in data
5.0.0
SQL injection Prevention - POST : possible version probing in data
5.0.0
XSS - Prevention - POST : suspicious 'iframe' tag found in data
5.0.0
     


 
 
 
 
 Risk level 
Low 

 Vulnerability First Public Report Date 
2014-07-31 

 Target Type 
Server 

 Possible exploit 
Remote