CVE-2018-9019: Dolibarr SQL Injection vulnerability

dolibarr/dolibarr Updated 02 Oct 2025

Summary

13/05/2022
Yes i
Critical
9.8

CVE-2018-9019: Dolibarr SQL Injection vulnerability. Affects dolibarr/dolibarr versions < 7.0.2. Fixed in 7.0.2. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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 →

Share this vulnerability

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.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback

Follow Vulert in Google

Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.