CVE-2026-58376: Dolibarr SQL Injection in REST API Endpoints
Dolibarr, an open-source ERP and CRM platform, contains a SQL injection flaw in its REST API that permits authenticated users to extract sensitive database contents. The vulnerability exists in two API endpoints—setup and multicurrencies—where user-supplied filter parameters are insufficiently validated. An attacker with valid API credentials can bypass the weak parenthesis-checking validation and inject malicious SQL commands to read arbitrary data, including password hashes and API keys. This requires prior authentication but poses a significant confidentiality risk once an attacker gains API access.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.6 HIGH · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L
- Weaknesses (CWE)
- CWE-89
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-06-30 / 2026-07-14
NVD description (verbatim)
Dolibarr through 23.0.3, fixed in commit 14db36e, contains a sql injection vulnerability that allows authenticated API users to exfiltrate arbitrary database contents by supplying malicious values to the sqlfilters query parameter in the setup dictionary and multicurrencies REST API endpoints. The affected endpoints in api_setup.class.php and api_multicurrencies.class.php validate sqlfilters only for balanced parentheses and rewrite matched triplets, allowing text placed outside the expected shape such as an appended UNION SELECT to be concatenated into the SQL WHERE clause unmodified, enabling retrieval of sensitive data including password hashes and API keys.
4 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability stems from inadequate input sanitization in api_setup.class.php and api_multicurrencies.class.php. The sqlfilters query parameter is validated only for balanced parentheses, and matched triplets are rewritten, but any text outside the expected pattern—such as a UNION SELECT statement—passes through unmodified into the SQL WHERE clause. This classic second-order injection allows authenticated API consumers to compose queries that retrieve unauthorized data. The flaw affects Dolibarr versions through 23.0.3 and was corrected in commit 14db36e. The CWE classification (CWE-89: SQL Injection) confirms the core vulnerability type.
Business impact
Compromise of an API account can lead to unauthorized exfiltration of sensitive business data: customer information, financial records, credentials, and internal API keys. Stolen credentials may enable lateral movement or privilege escalation within connected systems. The risk is heightened in multi-tenant deployments where a single API breach could expose data across customer boundaries. For organizations using Dolibarr for order management, invoicing, or accounting, data loss and regulatory compliance violations (GDPR, PCI DSS) may ensue.
Affected systems
Dolibarr versions through 23.0.3 are affected. The fix is available in commit 14db36e and will be included in the next patched release; verify the exact version in the official Dolibarr advisory and release notes. Organizations running REST API integrations—particularly those exposing the setup or multicurrencies endpoints to external systems or delegating API token access—face the highest risk.
Exploitability
Exploitation requires valid API credentials, which restricts the attack surface to authenticated users or accounts whose tokens have been compromised. However, API tokens are often long-lived and may be embedded in integrations or third-party applications, increasing the likelihood of token disclosure over time. Once a token is obtained, the attack requires no special tools—a simple HTTP request with a malicious sqlfilters parameter suffices. Active exploitation is not known to be widespread (the vulnerability is not listed on CISA's KEV catalog), but the straightforward injection technique and high sensitivity of exposed data make it an attractive target for insiders or supply-chain attackers.
Remediation
Upgrade Dolibarr to a patched version released after commit 14db36e. If immediate patching is not feasible, restrict API token distribution, audit existing tokens for signs of misuse, and monitor REST API traffic for suspicious sqlfilters patterns (e.g., UNION, SELECT, SLEEP). Consider temporary disable of the setup and multicurrencies endpoints if they are not essential to operations. Rotate all API keys and database credentials as a precaution.
Patch guidance
Apply the patch from commit 14db36e or a subsequent official release. Test the patch in a non-production environment first to ensure compatibility with existing integrations. Review any scripts or applications that interact with the affected REST API endpoints to confirm they do not rely on the old validation behavior. After patching, invalidate and reissue API tokens to all consumers as a precautionary measure.
Detection guidance
Monitor REST API logs for suspicious sqlfilters parameters containing SQL keywords: UNION, SELECT, DROP, INSERT, UPDATE, SLEEP, BENCHMARK, or semicolons. Establish baseline API usage patterns and alert on unusual query complexity or volume. Enable database query logging to detect anomalous SELECT statements targeting sensitive tables (users, roles, credentials). Consider implementing a Web Application Firewall (WAF) rule to block sqlfilters input that does not conform to expected benign patterns. Audit API token creation, rotation, and revocation events.
Why prioritize this
Although the vulnerability requires prior authentication, the simplicity of exploitation and the high value of exposed data (credentials, keys, financial records) justify immediate attention. Organizations with public-facing or loosely-controlled API access, or those that have shared API tokens across multiple vendors or teams, should prioritize patching to reduce the window for token-based attacks. The CVSS score of 7.6 (HIGH) reflects moderate confidentiality impact offset by the authentication prerequisite.
Risk score, explained
The CVSS 3.1 score of 7.6 is driven by a High confidentiality impact (C:H), limited integrity impact (I:L), and limited availability impact (A:L). The attack vector is network-based (AV:N) with low complexity (AC:L), requiring login privileges (PR:L) but no user interaction (UI:N). The HIGH severity designation reflects the real-world risk to sensitive business data, though the authentication requirement prevents a critical score. Organizations handling PII or financial data should treat this as a priority despite the authentication gate.
Frequently asked questions
Do we need valid API credentials to exploit this vulnerability?
Yes. The flaw requires an authenticated API request with a valid token or API key. This limits the immediate attack surface, but API tokens—especially those used for integrations—can persist for months or years and may be compromised through supply-chain attacks, insider threats, or accidental exposure.
What types of data can be stolen?
Any data accessible to the API user's database account can be extracted, including user records with password hashes, API keys and tokens, customer and order information, financial records, and configuration details. The exact scope depends on the database schema and the API account's role-based permissions.
Is there an automatic workaround if we cannot patch immediately?
A complete workaround is difficult without code modification. Interim mitigations include revoking unnecessary API tokens, restricting API access by IP address, monitoring logs for suspicious queries, and disabling the affected endpoints if not actively used. However, these are stopgaps; patching is essential.
Is this vulnerability actively exploited in the wild?
As of the current intelligence, this vulnerability is not listed on CISA's Known Exploited Vulnerabilities (KEV) catalog, suggesting no widespread exploitation has been publicly documented. However, the straightforward nature of SQL injection and the sensitivity of accessible data mean vigilance is warranted.
This analysis is provided for informational purposes to assist security professionals in vulnerability assessment and risk prioritization. The specifics of patch versions, release timelines, and vendor statements should be verified against official Dolibarr advisories and security announcements. No guarantee is made regarding the completeness or applicability of detection guidance to all environments. Always test patches and mitigations in non-production settings before deployment. Consult your security team and vendor support for guidance tailored to your infrastructure. Source: NVD (public-domain), retrieved 2026-08-09. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2016-20062HIGHSQL Injection in Simply Poll 1.4.1 WordPress Plugin - Unauthenticated Data Theft
- CVE-2016-20063HIGHSQL Injection in Single Personal Message 1.0.3 – Credential & Data Theft Risk
- CVE-2016-20065HIGHUnauthenticated SQL Injection in Product Catalog 8 WordPress Plugin
- CVE-2016-20068HIGHUnauthenticated SQL Injection in WordPress Booking Calendar Contact Form 1.0.23
- CVE-2016-20069HIGHUnauthenticated SQL Injection in WordPress Booking Calendar Contact Form 1.0.23
- CVE-2016-20071HIGHCritical SQL Injection in WordPress 404 Redirection Manager Plugin v1.0
- CVE-2016-20072HIGHBBS e-Franchise WordPress Plugin SQL Injection – Remote Data Exfiltration Risk
- CVE-2016-20073HIGHSQL Injection in Answer My Question 1.3 WordPress Plugin