/

CVE-2026-116218

Severity:

HIGH RISK

(7.6)

SQL Injection (CWE-89) in Dolibarr BankAccount API

CVE-2026-116218

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthorized database access and sensitive information disclosure

Severity:

HIGH RISK

(7.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Dolibarr ERP CRM contains an SQL injection vulnerability in the third-party bankaccounts REST endpoint, where authenticated API users can influence the bank account type value. An attacker with the required company-creation permission may use this weakness to extract sensitive database information, including password hashes and API keys, through blind SQL queries.

Dolibarr ERP CRM contains an SQL injection vulnerability in the third-party bankaccounts REST endpoint, where authenticated API users can influence the bank account type value. An attacker with the required company-creation permission may use this weakness to extract sensitive database information, including password hashes and API keys, through blind SQL queries.

Affected context

The issue may occur in Dolibarr deployments where:

  • The third-party bankaccounts REST endpoint is enabled
  • Authenticated API users can access the endpoint
  • The caller has the societe/creer permission
  • The type field reaches CompanyBankAccount::create() without effective parameterization or escaping

Risk depends on endpoint exposure, assigned permissions, database privileges, and the sensitivity of stored records.

The issue may occur in Dolibarr deployments where:

  • The third-party bankaccounts REST endpoint is enabled
  • Authenticated API users can access the endpoint
  • The caller has the societe/creer permission
  • The type field reaches CompanyBankAccount::create() without effective parameterization or escaping

Risk depends on endpoint exposure, assigned permissions, database privileges, and the sensitivity of stored records.

Exploit preconditions

  • Attack surface: Authenticated third-party bankaccounts REST API
  • Required access: An API identity with the societe/creer permission
  • Trigger point: Processing the user-controlled type field during bank account creation
  • Why exploitation is possible: The value is incorporated into a database query without sufficient parameterization, allowing query logic to be altered and inferred through response timing
  • Attack surface: Authenticated third-party bankaccounts REST API
  • Required access: An API identity with the societe/creer permission
  • Trigger point: Processing the user-controlled type field during bank account creation
  • Why exploitation is possible: The value is incorporated into a database query without sufficient parameterization, allowing query logic to be altered and inferred through response timing

Why this happens

The vulnerability results from constructing or executing SQL with an input value that has not been safely parameterized. When the type field is treated as query syntax rather than as data, an authenticated caller may influence database operations and infer protected values. This behavior maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command, commonly known as SQL injection.

The vulnerability results from constructing or executing SQL with an input value that has not been safely parameterized. When the type field is treated as query syntax rather than as data, an authenticated caller may influence database operations and infer protected values. This behavior maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command, commonly known as SQL injection.

Potential impact

  • An attacker may read password hashes or API keys from the database
  • Sensitive business and customer information could be disclosed
  • Database integrity could be affected if the vulnerable operation permits modification
  • Compromised credentials could enable access to connected systems or integrations
  • Application availability could be reduced through expensive or disruptive queries
  • An attacker may read password hashes or API keys from the database
  • Sensitive business and customer information could be disclosed
  • Database integrity could be affected if the vulnerable operation permits modification
  • Compromised credentials could enable access to connected systems or integrations
  • Application availability could be reduced through expensive or disruptive queries

General mitigation guidance

Mitigation should focus on ensuring that all API-controlled values remain data throughout database processing.

Common defensive patterns include:

  • Use parameterized queries or approved database abstraction methods for every query value
  • Apply allowlist validation when fields such as account type have a defined set of valid values
  • Avoid relying on escaping as the primary SQL injection defense
  • Restrict API permissions according to least privilege and separate record creation from sensitive data access
  • Limit database-account privileges available to the application
  • Protect and rotate exposed secrets, including API keys, when disclosure is suspected
  • Log anomalous query timing, repeated failed requests, and unusual bank account creation activity

Mitigation should focus on ensuring that all API-controlled values remain data throughout database processing.

Common defensive patterns include:

  • Use parameterized queries or approved database abstraction methods for every query value
  • Apply allowlist validation when fields such as account type have a defined set of valid values
  • Avoid relying on escaping as the primary SQL injection defense
  • Restrict API permissions according to least privilege and separate record creation from sensitive data access
  • Limit database-account privileges available to the application
  • Protect and rotate exposed secrets, including API keys, when disclosure is suspected
  • Log anomalous query timing, repeated failed requests, and unusual bank account creation activity

How teams detect issues like this

Detection can include static analysis for string concatenation, interpolation, or formatting of SQL statements with request-derived values. Code review should examine REST handlers, model methods, and database helpers for missing parameter binding and for validation performed after query construction.

Runtime monitoring may flag repeated requests with unusual timing patterns, anomalous values in the type field, and unexpected access to credential-related records. CI policies can require parameterized database APIs and automated security review tools can help identify suspect query construction.

Detection can include static analysis for string concatenation, interpolation, or formatting of SQL statements with request-derived values. Code review should examine REST handlers, model methods, and database helpers for missing parameter binding and for validation performed after query construction.

Runtime monitoring may flag repeated requests with unusual timing patterns, anomalous values in the type field, and unexpected access to credential-related records. CI policies can require parameterized database APIs and automated security review tools can help identify suspect query construction.

Sources

SourceLink
github.comgithub.com/Dolibarr/dolibarr
github.comgithub.com/Dolibarr/dolibarr/blob/23.0.3/htdocs/societe/class/api_thirdparties.class.php#L1852
github.comgithub.com/Dolibarr/dolibarr/blob/23.0.3/htdocs/societe/class/companybankaccount.class.php#L399
github.comgithub.com/Dolibarr/dolibarr/commit/19991c8ffa9b4fd7338b7ef2585fadb554b86735
vulncheck.comvulncheck.com/advisories/dolibarr-erp-crm-19.0.0-before-23.0.4-sql-injection-via-bankaccounts-api-type-field

Frequently asked

questions

It may be exploitable through the REST API when that endpoint is reachable and the attacker has valid credentials with the required permission. It is not an unauthenticated issue based on the described conditions.

The attacker needs an authenticated API identity capable of invoking the relevant bank account creation operation, including the societe/creer permission.

The safest pattern is to use parameterized queries or trusted database APIs, combined with strict allowlist validation for the account type field.

Enforce parameter binding in development standards and CI checks, review authorization boundaries, minimize database privileges, and monitor API activity for injection indicators and unusual data access.

It may be exploitable through the REST API when that endpoint is reachable and the attacker has valid credentials with the required permission. It is not an unauthenticated issue based on the described conditions.

The attacker needs an authenticated API identity capable of invoking the relevant bank account creation operation, including the societe/creer permission.

The safest pattern is to use parameterized queries or trusted database APIs, combined with strict allowlist validation for the account type field.

Enforce parameter binding in development standards and CI checks, review authorization boundaries, minimize database privileges, and monitor API activity for injection indicators and unusual data access.

Find out what's already
exploitable in your codebase.