Description
Dolibarr ERP/CRM versions <= 3.1.1 and <= 3.2.0 contain a post-authenticated OS command injection vulnerability in its database backup feature. The export.php script fails to sanitize the sql_compat parameter, allowing authenticated users to inject arbitrary system commands, resulting in remote code execution on the server.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Dolibarr Project | ERP/CRM | ≤ 3.2.0 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 16.04 LTS | dolibarr | No fix yet | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
Dolibarr ERP/CRM Post-Auth OS Command Injection
exploit/linux/http/dolibarr_cmd_exec
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
References
- https://raw.githubusercontent.com/rapid7/metasploit-framework/master/modules/exploits/linux/http/dolibarr_cmd_exec.rb exploit
- https://www.exploit-db.com/exploits/18725 exploit
- https://www.exploit-db.com/exploits/18724 exploit
- https://seclists.org/fulldisclosure/2012/Apr/78 technical-description exploit
- https://www.dolibarr.org/ product
- https://www.vulncheck.com/advisories/dolibarr-erp-crm-post-auth-os-command-injection third-party-advisory