{"id":"CVE-2026-81728","state":"PUBLISHED","title":"Dolibarr before 24.0.0 SQL Injection via the CSV and XLSX Import Update Keys","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.","publishedAt":"2026-08-27T20:07:33.503Z","updatedAt":"2026-09-24T14:19:48.100Z","severity":{"score":8.6,"label":"High","version":"4.0","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","source":"VulnCheck"},"assigner":"VulnCheck","products":["Dolibarr dolibarr"],"affected":[{"vendor":"Dolibarr","product":"dolibarr","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"24.0.0","versionType":"semver"},{"version":"24.0.0","status":"unaffected","versionType":"semver"}]}],"references":["https://github.com/Dolibarr/dolibarr/commit/24b1b99c89c79a3fe2d1e83b22dc1810cf0fa6e1","https://github.com/Dolibarr/dolibarr","https://github.com/Dolibarr/dolibarr/blob/23.0.4/htdocs/core/modules/import/import_csv.modules.php#L925","https://www.vulncheck.com/advisories/dolibarr-before-24.0.0-sql-injection-via-the-csv-and-xlsx-import-update-keys"],"weaknesses":["CWE-89"],"ingestedAt":"2026-10-29T20:13:15.269Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/81xxx/CVE-2026-81728.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-81728","state":"PUBLISHED","datePublished":"2026-08-27T20:07:33.503Z","dateUpdated":"2026-09-24T14:19:48.100Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-08-27T11:15:29.420Z"},"containers":{"cna":{"title":"Dolibarr before 24.0.0 SQL Injection via the CSV and XLSX Import Update Keys","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Dolibarr","product":"dolibarr","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"24.0.0","versionType":"semver"},{"version":"24.0.0","status":"unaffected","versionType":"semver"}]}],"references":[{"url":"https://github.com/Dolibarr/dolibarr/commit/24b1b99c89c79a3fe2d1e83b22dc1810cf0fa6e1","tags":["patch"],"name":"Patch Commit"},{"url":"https://github.com/Dolibarr/dolibarr","tags":["product"]},{"url":"https://github.com/Dolibarr/dolibarr/blob/23.0.4/htdocs/core/modules/import/import_csv.modules.php#L925","tags":["technical-description"]},{"url":"https://www.vulncheck.com/advisories/dolibarr-before-24.0.0-sql-injection-via-the-csv-and-xlsx-import-update-keys","name":"VulnCheck Advisory: Dolibarr before 24.0.0 SQL Injection via the CSV and XLSX Import Update Keys","tags":["third-party-advisory"]}],"metrics":[{"format":"CVSS","cvssV4_0":{"version":"4.0","vectorString":"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","attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"LOW","userInteraction":"NONE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","baseScore":8.6,"baseSeverity":"HIGH"}},{"format":"CVSS","cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"NONE","baseScore":8.1,"baseSeverity":"HIGH"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-89","lang":"en","description":"Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')","type":"CWE"}]}],"providerMetadata":{"shortName":"VulnCheck","orgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateUpdated":"2026-09-24T14:19:48.100Z"},"datePublic":"2026-07-09T00:00:00.000Z","cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:dolibarr:dolibarr_erp\\/crm:*:*:*:*:*:*:*:*","versionEndExcluding":"24.0.0"}]}]}],"credits":[{"lang":"en","value":"Michael Holmquist (HASP Labs)","type":"finder"}],"x_generator":{"engine":"vulncheck-endgame"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-08-28T14:08:32.306242Z","id":"CVE-2026-81728","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-08-28T14:08:40.368Z"}}]}}}