Description
Dolibarr before 24.0.0 contains a SQL injection in its CSV and XLSX import wizard. The wizard reads its update keys with GETPOST('updatekeys', 'array') in htdocs/imports/import.php, which applies only the generic alphanohtml filter: that strips HTML but leaves SQL keywords, comment markers, parentheses, spaces and quotes intact. import_insert() in htdocs/core/modules/import/import_csv.modules.php then iterates the submitted values and builds a filter with $where[] = $key.' = '.$data[$key], having first applied preg_replace('/^.*\./i', '', $key), an alias strip that does nothing to a value containing no dot. The assembled string is executed through $this->db->query(). The injected SELECT resolves the row id that the import then assigns to $lastinsertid, which becomes the WHERE target of a subsequent UPDATE, so a UNION SELECT returning an attacker-chosen integer both exfiltrates arbitrary table content and redirects which row the import overwrites; for category link tables the raw filter array is spliced into that UPDATE directly. The interface offers a fixed list of legitimate column codes but the server never checks the submitted values against it. A user holding the import permission can exploit this. Release 23.0.4 does not carry the fix; the allow-list test was added in 24.0.0.
Published: 2026-08-27
Score: 8.6 High
EPSS: < 1% Very Low
KEV: No
Impact: SQL Injection allowing data exfiltration and unauthorized record modification
Action: Immediate Patch
AI Analysis

Impact

Dolibarr versions prior to 24.0.0 allow a user with import rights to inject arbitrary SQL through the CSV or XLSX import wizard. The import routine applies only an informal alphanohtml filter to the update keys, leaving SQL syntax intact. The crafted input causes the framework to build a WHERE clause that includes the attacker‑supplied payload, executing it via the database driver. The injected query can retrieve arbitrary table contents and, because the import logic uses the result of the SELECT as a target row, the attacker can overwrite or redirect the database update. The flaw is a classic Insecure Direct Object Reference/SQL Injection issue that could be exploited by any authenticated importer. It bypasses the usual column validation because the server never verifies that the submitted keys match the predetermined list presented to the user. Risk is elevated by the lack of an EPSS score but the high CVSS of 8.6 indicates severe impact. The vulnerability is not listed in CISA KEV, suggesting no publicly known exploits yet, but the attack path requires only a valid Dolibarr account with import permission, which is a common role. Once exploited, an attacker could read sensitive data and modify critical records.

Affected Systems

Dolibarr ERP/CRM installations running any release older than version 24.0.0. The flaw is present in the 23.x branch, including 23.0.4, which does not contain the fix. The impact covers modules that rely on the CSV/XLSX import wizard, providing SQL injection and unauthorized record modification capabilities.

Risk and Exploitability

The CVSS score of 8.6 classifies this as a high‑severity flaw. Although the EPSS score is not provided, the lack of a known exploit in CISA KEV does not diminish the intrinsic risk, as any authenticated user with import rights can exercise the vulnerability. An attacker can manipulate the import wizard to inject arbitrary SQL, leading to data exfiltration and unauthorized record modification. The attack can be performed remotely via the web interface if the attacker has valid Dolibarr credentials and permissions.

Generated by OpenCVE AI on August 28, 2026 at 09:08 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Dolibarr to version 24.0.0 or later where a proper allow‑list check is implemented for import update keys.
  • Restrict or remove the import permission from user accounts that do not strictly need it.
  • If upgrading immediately is not possible, disable the CSV/XLSX import functionality via configuration or temporary removal of the import module until the patch is applied.

Generated by OpenCVE AI on August 28, 2026 at 09:08 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 28 Aug 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Fri, 28 Aug 2026 10:45:00 +0000

Type Values Removed Values Added
First Time appeared Dolibarr dolibarr
Dolibarr erp Crm
Vendors & Products Dolibarr dolibarr
Dolibarr erp Crm

Thu, 27 Aug 2026 18:00:00 +0000

Type Values Removed Values Added
Description Dolibarr before 24.0.0 contains a SQL injection in its CSV and XLSX import wizard. The wizard reads its update keys with GETPOST('updatekeys', 'array') in htdocs/imports/import.php, which applies only the generic alphanohtml filter: that strips HTML but leaves SQL keywords, comment markers, parentheses, spaces and quotes intact. import_insert() in htdocs/core/modules/import/import_csv.modules.php then iterates the submitted values and builds a filter with $where[] = $key.' = '.$data[$key], having first applied preg_replace('/^.*\./i', '', $key), an alias strip that does nothing to a value containing no dot. The assembled string is executed through $this->db->query(). The injected SELECT resolves the row id that the import then assigns to $lastinsertid, which becomes the WHERE target of a subsequent UPDATE, so a UNION SELECT returning an attacker-chosen integer both exfiltrates arbitrary table content and redirects which row the import overwrites; for category link tables the raw filter array is spliced into that UPDATE directly. The interface offers a fixed list of legitimate column codes but the server never checks the submitted values against it. A user holding the import permission can exploit this. Release 23.0.4 does not carry the fix; the allow-list test was added in 24.0.0.
Title Dolibarr before 24.0.0 SQL Injection via the CSV and XLSX Import Update Keys
First Time appeared Dolibarr
Dolibarr dolibarr Erp\/crm
Weaknesses CWE-89
CPEs cpe:2.3:a:dolibarr:dolibarr_erp\/crm:*:*:*:*:*:*:*:*
Vendors & Products Dolibarr
Dolibarr dolibarr Erp\/crm
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N'}

cvssV4_0

{'score': 8.6, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N'}


Subscriptions

Dolibarr Dolibarr Dolibarr Erp\/crm Erp Crm
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-28T14:08:40.368Z

Reserved: 2026-08-27T11:15:29.420Z

Link: CVE-2026-81728

cve-icon Vulnrichment

Updated: 2026-08-28T14:08:36.764Z

cve-icon NVD

Status : Analyzed

Published: 2026-08-27T20:18:55.183

Modified: 2026-08-31T18:05:29.760

Link: CVE-2026-81728

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-28T10:30:17Z

Weaknesses
  • CWE-89

    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')