CVE-2017-14242: Dolibarr SQL Injection Vulnerability in don/list.php
Summary
CVE-2017-14242: Dolibarr SQL injection vulnerability in don/list.php. Affects dolibarr/dolibarr versions < 6.0.1. Fixed in 6.0.1. 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 package that provides a range of business management functionalities. It is widely used by organizations to streamline their operations, manage customer relationships, and handle various administrative tasks. Dolibarr is written in PHP and is available as a composer package. However, a critical SQL injection vulnerability has been discovered in the don/list.php file of Dolibarr version 6.0.0.
Vulnerability Detail
The SQL injection vulnerability in Dolibarr version 6.0.0 exists in the don/list.php file. Attackers can exploit this vulnerability by manipulating the 'statut' parameter to execute arbitrary SQL commands. This can lead to unauthorized access, data leakage, or even complete compromise of the affected system. The severity of this vulnerability is rated as critical with a CVSS score of 9.8. The vulnerability was first published on May 17, 2022, and it affects Dolibarr versions prior to 6.0.1.
How To Fix
Minimum fixed version
6.0.1
This is the first release that contains the fix.
composer require dolibarr/dolibarr:6.0.1
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, a temporary workaround can be implemented by modifying the affected file (don/list.php) to sanitize and validate user input before executing SQL queries. Here is an example of how the code can be modified:
// Original code
$statut = $_GET['statut'];
$query = "SELECT * FROM table WHERE statut = '" . $statut . "'";
// Modified code
$statut = mysqli_real_escape_string($connection, $_GET['statut']);
$query = "SELECT * FROM table WHERE statut = '" . $statut . "'";
By using the mysqli_real_escape_string function, the user input is properly escaped, preventing SQL injection attacks. However, it is strongly recommended to upgrade to the latest version of Dolibarr as soon as possible.
Conclusion
In conclusion, Dolibarr version 6.0.0 is vulnerable to a critical SQL injection vulnerability in the don/list.php file. To mitigate this vulnerability, it is crucial to upgrade to version 6.0.1 or later. If immediate upgrading is not possible, implementing the provided workaround can help protect your system. For further assistance and support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for dolibarr/dolibarr →
FAQ
Dolibarr is an open-source ERP and CRM software package that provides business management functionalities.
The vulnerability allows remote attackers to execute arbitrary SQL commands, potentially leading to unauthorized access or data leakage.
To fix this vulnerability, upgrade Dolibarr to version 6.0.1 or later.
Yes, a temporary workaround is to modify the affected file (don/list.php) to sanitize and validate user input before executing SQL queries.
The severity of this vulnerability is rated as critical with a CVSS score of 9.8.
References
Related vulnerabilities
Recent vulnerabilities recorded for dolibarr/dolibarr.