CVE-2018-13448: Dolibarr ERP/CRM SQL Injection Vulnerability in product/card.php

dolibarr/dolibarr Updated 02 Oct 2025

Summary

14/05/2022
Yes i
Critical
9.8

CVE-2018-13448: Dolibarr SQL injection vulnerability in product/card.php. Affects dolibarr/dolibarr versions >= 7.0.3, < 7.0.4. Fixed in 7.0.4. 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 Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Dolibarr ERP/CRM is an open-source software package that provides enterprise resource planning (ERP) and customer relationship management (CRM) functionalities. It is widely used for managing various business processes, including sales, inventory, invoicing, and more. Dolibarr version 7.0.3 is affected by a critical SQL injection vulnerability in the product/card.php file.

Vulnerability Detail

The SQL injection vulnerability in Dolibarr ERP/CRM version 7.0.3 exists in the product/card.php file. Attackers can exploit this vulnerability by manipulating the country_id parameter to execute arbitrary SQL commands. This can lead to unauthorized access, data leakage, data manipulation, and potentially complete compromise of the affected system.

How To Fix

Minimum fixed version

7.0.4

This is the first release that contains the fix.

composer require dolibarr/dolibarr:7.0.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading immediately is not possible, users can apply a temporary workaround by modifying the affected file (product/card.php) to sanitize and validate user input before executing SQL queries. Here is an example of how to implement input validation and parameter binding using PDO in PHP:

// Retrieve the country_id parameter
$countryId = $_GET['country_id'];

// Sanitize and validate the input
$countryId = filter_var($countryId, FILTER_VALIDATE_INT);

// Prepare and execute the SQL query using parameter binding
$stmt = $pdo->prepare('SELECT * FROM products WHERE country_id = :countryId');
$stmt->bindParam(':countryId', $countryId, PDO::PARAM_INT);
$stmt->execute();

// Fetch the results
$results = $stmt->fetchAll();

// Process the results
foreach ($results as $row) {
    // Process each row
}

Note: This is a temporary workaround and should not be considered a long-term solution. Upgrading to the latest version is still strongly recommended.

Conclusion

The SQL injection vulnerability in Dolibarr ERP/CRM version 7.0.3 can have severe consequences, including unauthorized access, data leakage, and potential compromise of the affected system. It is crucial to upgrade to the latest version (7.0.4 or later) to mitigate this vulnerability. If immediate upgrade is not possible, applying the provided workaround can help temporarily protect the system. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for dolibarr/dolibarr →

Share this vulnerability

FAQ

Dolibarr ERP/CRM is an open-source software package that provides enterprise resource planning (ERP) and customer relationship management (CRM) functionalities. It is widely used for managing various business processes, including sales, inventory, invoicing, and more.

The SQL injection vulnerability in Dolibarr ERP/CRM version 7.0.3 allows remote attackers to execute arbitrary SQL commands. This can lead to unauthorized access, data leakage, data manipulation, and potentially complete compromise of the affected system.

To fix this vulnerability, it is recommended to upgrade Dolibarr ERP/CRM to version 7.0.4 or later. The upgrade includes a patch that addresses the SQL injection vulnerability in product/card.php. Users should ensure they are running the latest version of Dolibarr and follow the upgrade instructions provided by the project.

If upgrading immediately is not possible, users can apply a temporary workaround by modifying the affected file (product/card.php) to sanitize and validate user input before executing SQL queries. However, this should not be considered a long-term solution, and upgrading to the latest version is still strongly recommended.

Related vulnerabilities

Recent vulnerabilities recorded for dolibarr/dolibarr.

How To Fix

Minimum fixed version

7.0.4

This is the first release that contains the fix.

composer require dolibarr/dolibarr:7.0.4

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