PT-2026-82745 · Dolibarr · Dolibarr
CVSS v4.0
8.6
High
| Vector | AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N |
Name of the Vulnerable Software and Affected Versions
Dolibarr versions prior to 24.0.0
Description
A SQL injection exists in the CSV and XLSX import wizard. The issue occurs because the wizard reads update keys using the
GETPOST('updatekeys','array') function in htdocs/imports/import.php, applying only a filter that removes HTML while leaving SQL keywords, quotes, and parentheses intact. Subsequently, the import insert() function in htdocs/core/modules/import/import csv.modules.php builds a filter where the $where[] variable is constructed using the submitted keys without proper validation against a legitimate list of column codes. This allows a user with import permissions to use a UNION SELECT statement to exfiltrate arbitrary table content or redirect which row is overwritten during an update. The vulnerability is triggered when the assembled string is executed via $this->db->query().Recommendations
Update to version 24.0.0 or later.
As a temporary mitigation, restrict import permissions to only trusted users.
Exploit
Fix
SQL injection
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Dolibarr