ZeroHour

CVE-2026-81728

large

SQL Injection in Dolibarr ERP/CRM CSV/XLSX Import Wizard

CVSS 4.0
8.6 high
EPSS
<1%p17
Published
()
Modified
AI analysis

Dolibarr ERP/CRM before 24.0.0 contains a SQL injection (CWE-89) in the CSV and XLSX import wizard, triggered through the 'updatekeys' GET parameter handled in htdocs/imports/import.php. The parameter is read with only the generic alphanohtml filter, which strips HTML but leaves SQL keywords, comments, parentheses, spaces and quotes intact, and import_insert() in htdocs/core/modules/import/import_csv.modules.php concatenates the submitted values into a SQL filter without validating them against the fixed list of legitimate column codes the interface offers. An authenticated user holding the import permission can inject a UNION SELECT to exfiltrate content from arbitrary database tables, and because the injected integer becomes the WHERE target of a subsequent UPDATE (and, for category link tables, the raw filter is spliced into that UPDATE directly), the attacker can also redirect which rows the import overwrites. All Dolibarr deployments prior to 24.0.0 are affected; the allow-list fix was added only in 24.0.0, and release 23.0.4 does not carry it. Exploitation has not been observed: there is no known public proof-of-concept, the flaw is not in CISA KEV, and EPSS assigns a 0.3% probability of exploitation in the next 30 days.

What to do: Upgrade to Dolibarr 24.0.0 or later, noting that 23.0.4 does not contain the fix. Until patched, limit the import permission to trusted users only, since exploitation requires an account with that privilege. Check import logs for unexpected or oversized 'updatekeys' values and audit recently imported rows for unexpected edits.

Affected
Dolibarr ERP/CRMall versions before 24.0.0 (23.0.4 does not include the fix; allow-list check added in 24.0.0)
Estimated exposure
largeorder of 100,000+ users across tens of thousands of self-hosted and internet-exposed instances (estimate, not a measured count) — Dolibarr is a widely deployed open-source ERP/CRM typically self-hosted by small and mid-sized organizations, so exploiting this requires only one user with import permission per vulnerable (<24.0.0) instance, but the data provides no scan…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

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.

Vendors
dolibarr
Products
dolibarr erp\/crm
Weakness
CWE-89
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

In the news

No ingested article mentions this CVE yet.