CVE-2018-9019: Dolibarr SQL Injection vulnerability
Summary
CVE-2018-9019: Dolibarr SQL Injection vulnerability. Affects dolibarr/dolibarr versions < 7.0.2. Fixed in 7.0.2. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Dolibarr is an open-source ERP and CRM software designed for small and medium-sized businesses. It provides various features such as accounting, inventory management, project management, and more. This vulnerability affects Dolibarr versions prior to 7.0.2.
Vulnerability Detail
The vulnerability in Dolibarr allows remote attackers to execute arbitrary SQL commands through several endpoints, including accountmodel.php, categories_list.php, journals_list.php, dict.php, mails_templates.php, and website.php. The vulnerability arises due to insufficient input validation of the 'sortfield' parameter. By exploiting this vulnerability, an attacker can manipulate the SQL queries and potentially gain unauthorized access to the database or perform other malicious actions.
How To Fix
Minimum fixed version
7.0.2
This is the first release that contains the fix.
composer require dolibarr/dolibarr:7.0.2
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If upgrading to the latest version is not immediately feasible, users can apply the following workaround to mitigate the risk: Implement input validation and sanitization for the 'sortfield' parameter in the affected endpoints. This can be done by using prepared statements or parameterized queries to prevent SQL injection attacks. Here is an example of how to use prepared statements in PHP:
$sortfield = $_GET['sortfield'];
$stmt = $pdo->prepare('SELECT * FROM table WHERE sortfield = :sortfield');
$stmt->bindParam(':sortfield', $sortfield);
$stmt->execute();
// Process the results
Conclusion
The SQL Injection vulnerability in Dolibarr before version 7.0.2 poses a significant risk to the security of the system. It is crucial for users to upgrade to the latest version or apply the recommended workaround to mitigate the vulnerability. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for dolibarr/dolibarr →
FAQ
Dolibarr is an open-source ERP and CRM software designed for small and medium-sized businesses. It provides various features such as accounting, inventory management, project management, and more.
This vulnerability allows remote attackers to execute arbitrary SQL commands, potentially leading to unauthorized access to the database or other malicious actions.
To fix this vulnerability, it is recommended to upgrade Dolibarr to version 7.0.2 or later. This version includes the necessary patches to mitigate the SQL Injection vulnerability.
If upgrading to the latest version is not immediately feasible, users can implement input validation and sanitization for the 'sortfield' parameter in the affected endpoints.
For more information about this vulnerability, you can refer to the Dolibarr GitHub advisory database or contact the Dolibarr support team.
Related vulnerabilities
Recent vulnerabilities recorded for dolibarr/dolibarr.
Follow Vulert in Google
Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.