Dolibarr ERP/CRM OS Command Injection (CVE-2023-30253) Exploit Publicly Available
A public exploit is available for an OS Command Injection vulnerability in Dolibarr ERP/CRM versions prior to 17.0.1 (CVE-2023-30253), which allows authenticated users to inject PHP code via the Website/CMS module to obtain a reverse shell as the www-data user.
A public exploit has been published for CVE-2023-30253, an OS Command Injection vulnerability affecting Dolibarr ERP/CRM versions prior to 17.0.1. Discovered by Swascan (now Hacktivesecurity) in May 2023, the vulnerability resides in the Website/CMS module, allowing authenticated users to inject PHP code and execute arbitrary commands. An attacker can leverage this vulnerability to gain a reverse shell as the www-data user. The availability of a working exploit significantly increases the risk to unpatched Dolibarr ERP/CRM instances. The exploit uses specifically crafted HTTP POST requests to create a website, create a page within that website, inject malicious PHP code into the page content, and then trigger the execution of the injected code.
Attack Chain
- Attacker authenticates to the Dolibarr ERP/CRM instance, obtaining session cookies and a CSRF token.
- Attacker crafts a POST request to
/website/index.php?action=createsiteto create a new website with parameters such asWEBSITE_REFandWEBSITE_TITLE. - Attacker creates a page within the newly created website by sending a POST request to
/website/index.php?website=misitiowith parametersWEBSITE_TYPE_CONTAINERandWEBSITE_TITLE. - The attacker injects malicious PHP code into the page content by sending a POST request to
/website/index.php?website=misitio&pageid=1&action=editsource. The injected code contains a PHP reverse shell payload. ThePAGE_CONTENTparameter contains the injected PHP code. - The attacker triggers the execution of the injected PHP code by accessing the crafted URL:
/public/website/index.php?website=misitio&pageref=misitio. - The injected PHP code executes, creating a reverse shell connection back to the attacker’s designated
lhostandlport(e.g., 10.10.14.5:4444). - The attacker gains shell access with the privileges of the
www-datauser.
Impact
Successful exploitation of CVE-2023-30253 allows an attacker to execute arbitrary OS commands on the Dolibarr ERP/CRM server. This can lead to complete system compromise, including data theft, modification, and denial of service. Since ERP/CRM systems often contain sensitive business data, the impact can be significant. While the number of affected organizations is not specified, any Dolibarr ERP/CRM instance running a version prior to 17.0.1 is vulnerable.
Recommendation
- Apply the patch by upgrading to Dolibarr version 17.0.1 or later to address CVE-2023-30253.
- Monitor web server logs for POST requests to
/website/index.phpwith suspiciousPAGE_CONTENTparameters containing PHP code, as described in the Attack Chain. - Monitor network connections for outbound connections from the web server to unusual IPs and ports, which could indicate a reverse shell, using a network monitoring solution.
Detection coverage 2
Detects CVE-2023-30253 Exploitation — Suspicious PAGE_CONTENT in Dolibarr Website Module
highDetects CVE-2023-30253 exploitation attempt by identifying POST requests to the Dolibarr website module with suspicious PHP code in the PAGE_CONTENT parameter.
Detects CVE-2023-30253 Exploitation — Dolibarr Website Module Reverse Shell Trigger
mediumDetects CVE-2023-30253 exploitation — access to the Dolibarr website module public endpoint with a crafted website and pageref parameter, potentially triggering a reverse shell.
Detection queries are available on the platform. Get full rules →
Indicators of compromise
2
url
| Type | Value |
|---|---|
| url | https://sploitus.com/exploit?id=69442CC3-B601-573D-824A-CC019C504C9E&utm_source=rss&utm_medium=rss |
| url | http://crm.board.htb/public/website/index.php?website=s3a1f2bc&pageref=s3a1f2bc |