GHSA-v5fq-cf5m-vwv7 - Dolibarr has SQL Injection in societe/class/societe.class.php via localtax1_value parameter
### Summary
A SQL Injection vulnerability exists in the Third Party (Company) update functionality of Dolibarr ERP/CRM. The `localtax1_value` parameter (`lt1`) is concatenated
directly into an SQL UPDATE statement in `societe/class/societe.class.php` at line 1672 without any escaping, type casting, or parameterized query binding.
An authenticated user with standard "Third Party: Create/Edit" permission can extract any data from the database, including password hashes, API keys, and all
business data.
Tested on Dolibarr v23.0.0 (latest stable), default installation via official Docker image, MariaDB 10.11. No custom modules, no modified configuration.
### Details
**Vulnerable code** (`societe/class/societe.class.php`, line 1672):
```php
$sql .= ",localtax1_value =".$this->localtax1_value;
```
The value comes from `GETPOST('lt1', 'alpha')` (`societe/card.php`, line 1135). The only sanitization applied is `trim()` at line 1528 โ no `(float)` cast, no
`$db->escape()`.
The `alpha` input filter strips HTML tags and double quotes but does **not** strip single quotes, parentheses, commas, or SQL keywords. Since the injection point is
in a numeric SQL context (no quotes around the value), the attacker needs none of the filtered characters.
**Why the WAF does not block this:** Dolibarr's WAF (`waf.inc.php`) only checks SQL injection patterns in **GET** parameters, not POST. The POST-based `lt1`
parameter bypasses it entirely.
**The same vulnerability exists** for `localtax2_value` (parameter `lt2`) at line 1682.
Adjacent fields like `localtax1_assuj` are properly cast to `(int)`, showing the developers were aware of injection risk but missed these fields.
### PoC
**Steps to reproduce:**
1. Install Dolibarr v23.0.0 (tested with official Docker image, MariaDB 10.11)
2. Log in with a user that has "Third Parties: Create/Edit" permission (standard user, not admin)
3. Create or open any existing Third Party (company) reco
HIGH
Severity & confidence
Source severityhigh
Platform severityhigh
Confidencemedium
Exploitationunknown
CVSS8.8
Affected
Vendorsdolibarr
Productsdolibarr/dolibarr
Reporting sources (1)
GitHub Security Advisories
Timeline & provenance
Published2026-10-27T13:29:25
Last updated2026-10-28T19:42:00
Ingested2026-10-27T13:40:37
FreshnessNEAR-REAL-TIME
Threat typeadvisory
Recommended action
Review the advisory and upgrade affected packages to the first patched version.
Next steps
- Identify affected systems in your environment.
- Apply the vendor patch or mitigation guidance.
- Review logs for indicators described in the advisory.
- Follow the affected vendor/product to track updates.
Confidence explanation
Reported by a single or secondary source; treat as indicative, verify before acting.
Source type: vendor ยท Original: GitHub Security Advisories