TAJ-2026-002: Dolibarr ERP CRM, sqlfilters denylist bypass
Published . Last updated .
| Advisory ID | TAJ-2026-002 |
| CVE ID | CVE-2026-133476 |
| Vendor | Dolibarr |
| Product | Dolibarr ERP CRM |
| Severity | High (CVSS 3.1 base score 8.8) |
| Status | Fixed in Dolibarr 24.0.3, released 9 November 2026 |
Summary
dolForgeSQLCriteriaCallback() in htdocs/core/lib/functions.lib.php stripped only one table prefix from a sqlfilters operand before checking it against the forbidden field list (pass, pass_crypted, api_key). MariaDB and MySQL accept a two level qualification such as schema.alias.column, so an operand like dolibarr.u.pass_crypted passed the check and reached the WHERE clause. A remote authenticated user holding only the holiday read and readall permissions, which give no user management or administrative access, could use the resulting boolean oracle at GET /api/index.php/holidays to recover any user’s bcrypt password hash and api_key one character at a time, including an administrator’s. Based on code review, the same flaw is also reachable through GET /api/index.php/projects/alltimespent with the project read permission. This bypassed the fix for CVE-2026-89012, which added only a strtolower() call and did not address prefix depth.
Affected product and versions
| Vendor | Dolibarr |
| Product | Dolibarr ERP CRM |
| Affected versions | All versions before 24.0.3 (< 24.0.3) |
| Fixed versions | 24.0.3 and later (>= 24.0.3), released 9 November 2026 |
| Component | Universal Search Filter (sqlfilters):htdocs/core/lib/functions.lib.php, dolForgeSQLCriteriaCallback()Reached through GET /api/index.php/holidays (htdocs/holiday/class/api_holidays.class.php) |
Severity and CVSS vector
| CVSS version | 3.1 |
| Base score | 8.8 (High) |
| Vector string | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| CWE ID | CWE-424 (primary), CWE-203 |
| CWE description | CWE-424: Improper Protection of Alternate Path. CWE-203: Observable Discrepancy. |
CVE ID
Description
Dolibarr’s REST API lets callers filter list results with sqlfilters, an expression of the form (field:operator:value) that forgeSQLFromUniversalSearchCriteria() turns into SQL. Each criterion passes through dolForgeSQLCriteriaCallback(), which replaces any criterion on a forbidden field (pass, pass_crypted, api_key) with an always-true condition, so that sensitive columns of joined tables cannot be probed.
Before comparing an operand with that denylist, the callback stripped a single table prefix: u.pass_crypted became pass_crypted and was refused. MariaDB and MySQL also accept a column qualified with the schema as well as the table alias, schema.alias.column. For dolibarr.u.pass_crypted, stripping one prefix left u.pass_crypted, which is not in the denylist, so the criterion was accepted and reached the WHERE clause unchanged, where the database resolved it to the real column.
The holidays list joins the user table, so a filter on pass_crypted with a like operator and a growing prefix returns rows when the guess is right and none when it is wrong. That difference is a boolean oracle that recovers the stored hash one character at a time.
This bypassed the fix for CVE-2026-89012, which added only a strtolower() call, closing the uppercase variant of the forbidden field names but not the depth of the prefix in front of them.
Impact
The administrator’s api_key is accepted directly by the REST API as a bearer credential, so recovering it gives full administrative control of the application through the API, including accounting records, third parties, invoices and users. Recovery is case folded, because LIKE is case insensitive under the default collation, so the attacker must also resolve the case of the key’s letters: for a default 12 character key that is typically a few hundred and at most 4096 candidates, each testable with one API request. The bcrypt hash would additionally need offline cracking.
The same report identified a second, independent gap: the three entry denylist left other sensitive columns on the user row reachable with an ordinary single prefix, including pass_temp, which stores a pending password in cleartext, as well as national_registration_number, salary, salaryextra, birth, address, personal_mobile, note_private and iplastlogin. For EU deployments this is personal data with GDPR implications.
Remediation
Upgrade to Dolibarr 24.0.3 or later. The vendor’s fix implemented the remediation we recommended in our report. An operand with more than one level of prefix is now neutralised to an always true condition, the same treatment as a forbidden field. pass_temp is added to the always forbidden fields. The holidays and projects APIs now pass explicit forbidden field lists covering, among others, pass_temp, api_key, national_registration_number, birth, address, personal_mobile, personal_email, note_private and the last login IP fields. Salary fields are always forbidden on the holidays API, and forbidden on the projects API unless the caller may read salaries. The vendor also added a regression test for this bypass.
Proof of concept
Reproduced against Dolibarr 24.0.1 from the official tarball, with PHP 8.4.24 and MariaDB 11.8.9, and the modApi and modHoliday modules enabled. The attacking account has admin = 0, holds only the holiday read and readall permissions, and has an API key (LOWPRIVAPIKEY0001 in our lab). One leave record exists.
Both requests below use a prefix that does not match the stored hash, so a predicate that is actually applied must return zero rows.
Step 1. The single prefix form is caught by the denylist and neutralised, so the row is still returned:
curl -s -G --data-urlencode "sqlfilters=(u.pass_crypted:like:'ZZZZ%')" \
-H 'DOLAPIKEY: LOWPRIVAPIKEY0001' \
'http://127.0.0.1:8080/api/index.php/holidays'
# 1 row
Step 2. The doubled prefix passes the denylist and the predicate is applied:
curl -s -G --data-urlencode "sqlfilters=(dolibarr.u.pass_crypted:like:'ZZZZ%')" \
-H 'DOLAPIKEY: LOWPRIVAPIKEY0001' \
'http://127.0.0.1:8080/api/index.php/holidays'
# 0 rows
The difference between the two responses is the oracle. The only extra precondition is the database schema name, and this endpoint discloses it: a wrong name returns HTTP 503 and the correct one returns 200.
SQL level confirmation against MariaDB 11.8.9:
SELECT COUNT(*) AS n FROM llx_user AS u
WHERE dolibarr.u.pass_crypted LIKE '$2y%';
# n = 1
Iterating the prefix one character at a time recovered the administrator’s full 60 character bcrypt hash and 16 character api_key in 1918 requests. We re-verified the chain blind. The administrator’s api_key and password hash were rotated to freshly generated random values that the proof of concept could not see, and it recovered 16 of 16 characters of the new key and 60 of 60 of the new hash, matching the database exactly when case folded. The proof of concept makes only HTTP requests and has no database or shell access.
Disclosure timeline
| Date | Event |
|---|---|
| Reported to the vendor. | |
| Vendor committed a fix (commit 725d208) and credited TAJ APPS LLC as reporter in the commit message. | |
| Fix released in Dolibarr 24.0.3. | |
| Advisory published under our Vulnerability Disclosure Policy. | |
| Proof of concept published. | |
| CVE-2026-133476 published. |
References
| CVE record | CVE-2026-133476 |
| Patch | https://github.com/Dolibarr/dolibarr/commit/725d20884d93b46f07b66a93071d3229b870865f |
| Fixed release | https://github.com/Dolibarr/dolibarr/releases/tag/24.0.3 |
| ChangeLog | https://github.com/Dolibarr/dolibarr/blob/24.0.3/ChangeLog (24.0.3 ChangeLog) |
| Download | https://www.dolibarr.org/downloads.php |
| Affected source | https://github.com/Dolibarr/dolibarr/blob/24.0.2/htdocs/core/lib/functions.lib.php |
| Related | CVE-2026-89012, the earlier denylist fix this issue bypassed |
Credit
Found by TAJ APPS LLC.
Contact
If anything in this advisory or in its CVE record is wrong, incomplete or duplicated, email cve@tajapps.com, quoting CVE-2026-133476. To report a new vulnerability to us, email security@tajapps.com with “Security report” in the subject line, as set out in our Vulnerability Disclosure Policy.
Published under our Vulnerability Disclosure Policy. All advisories: tajapps.com/advisories.