CVE-2018-19998: Dolibarr SQL Injection Vulnerability in user/card.php
Summary
CVE-2018-19998: Dolibarr SQL injection vulnerability in user/card.php. Affects dolibarr/dolibarr versions < 8.0.4. Fixed in 8.0.4. 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 a range of features including accounting, inventory management, project management, and customer relationship management. Dolibarr is widely used for its user-friendly interface and extensive customization options. However, a SQL injection vulnerability has been discovered in the user/card.php file of Dolibarr version 8.0.2.
Vulnerability Detail
The SQL injection vulnerability in user/card.php allows remote authenticated users to execute arbitrary SQL commands by exploiting the 'employee' parameter. This can lead to unauthorized access, data manipulation, or even complete compromise of the affected system. The vulnerability has a CVSS score of 8.8, indicating a high severity level. It is crucial to address this vulnerability promptly to prevent potential exploitation and protect sensitive data.
How To Fix
Minimum fixed version
8.0.4
This is the first release that contains the fix.
composer require dolibarr/dolibarr:8.0.4
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 (user/card.php) to include input validation and sanitization for the 'employee' parameter. Here is an example of how the code can be modified:
// Add input validation and sanitization
$employee = $_GET['employee'];
$employee = filter_var($employee, FILTER_SANITIZE_STRING);
// Use prepared statements to prevent SQL injection
$stmt = $pdo->prepare('SELECT * FROM employees WHERE id = :id');
$stmt->bindParam(':id', $employee);
$stmt->execute();
// Continue with the rest of the code
Conclusion
The SQL injection vulnerability in Dolibarr version 8.0.2 poses a significant risk to the security and integrity of the affected system. It is crucial to promptly upgrade to version 8.0.4 or later to mitigate this vulnerability. Failure to address this issue may result in unauthorized access, data manipulation, or even complete compromise of the system. 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 offers a range of features including accounting, inventory management, project management, and customer relationship management.
SQL injection is a type of security vulnerability that allows an attacker to manipulate SQL queries by injecting malicious SQL code. This can lead to unauthorized access, data manipulation, or even complete compromise of the affected system.
The SQL injection vulnerability in Dolibarr allows remote authenticated users to execute arbitrary SQL commands by exploiting the 'employee' parameter. This can lead to unauthorized access, data manipulation, or even complete compromise of the affected system.
The SQL injection vulnerability in Dolibarr has a CVSS score of 8.8, indicating a high severity level.
To fix the SQL injection vulnerability in Dolibarr, it is recommended to upgrade to version 8.0.4 or later. The developers have addressed the issue in the updated release by implementing proper input validation and sanitization techniques.
References
Related vulnerabilities
Recent vulnerabilities recorded for dolibarr/dolibarr.