Skip to content

CVE-2026-81728 — Dolibarr before 24.0.0 contains a SQL injection in its CSV and XLSX import wizard.

Key facts

CVE-2026-81728 is a High (8.1) vulnerability: Dolibarr before 24.0.0 contains a SQL injection in its CSV and XLSX import wizard.. This entry ships a detection-only PoC and a Docker test lab.

CVE CVE-2026-81728
Severity High (8.1)
Detection / prevention —
PoC poc.py
Source 2026/CVE-2026-81728/

Details

English | 한국어

Description

Dolibarr before 24.0.0 contains a SQL injection in its CSV and XLSX import wizard. The wizard reads its update keys with GETPOST('updatekeys', 'array') in htdocs/imports/import.php, which applies only the generic alphanohtml filter: that strips HTML but leaves SQL keywords, comment markers, parentheses, spaces and quotes intact. import_insert() in htdocs/core/modules/import/import_csv.modules.php then iterates the submitted values and builds a filter with $where[] = $key.' = '.$data[$key], having first applied preg_replace('/^.*./i', '', $key), an alias strip that does nothing to a value containing no dot. The assembled string is executed through $this->db->query(). The injected SELECT resolves the row id that the import then assigns to $lastinsertid, which becomes the WHERE target of a subsequent UPDATE, so a UNION SELECT returning an attacker-chosen integer both exfiltrates arbitrary table content and redirects which row the import overwrites; for category link tables the raw filter array is spliced into that UPDATE directly. The interface offers a fixed list of legitimate column codes but the server never checks the submitted values against it. A user holding the import permission can exploit this. Release 23.0.4 does not carry the fix; the allow-list test was added in 24.0.0.

Vulnerability Details

Property Value
CVE ID CVE-2026-81728
Type SQLI
CVSS Score 8.1

Proof of Concept

Download

# Download PoC script
curl -O https://raw.githubusercontent.com/fankh/vulnerability-poc/main/2026/CVE-2026-81728/poc.py

Usage

# Run PoC against target
python3 poc.py --target <TARGET_URL>

# With authentication
python3 poc.py --target <TARGET_URL> --username <USER> --password <PASS>

⚠️ Warning: This PoC is for authorized security testing only. It uses detection-only techniques and does not exploit or damage target systems.

Test Lab

This repository includes a Docker-based test environment with both vulnerable and patched applications.

Quick Start

# Clone and navigate to CVE directory
cd CVE-2026-81728

# Start both applications
docker-compose up -d

# Run tests
./run-tests.sh    # Linux/Mac
./run-tests.ps1   # Windows PowerShell

Application Endpoints

Application URL Status
Vulnerable App http://localhost:8080 Shows vulnerability
Patched App http://localhost:8081 Demonstrates fix

Directory Structure

├── README.md           # English documentation
├── README_KO.md        # Korean documentation
├── poc.py              # PoC detection script
├── docker-compose.yml  # Container orchestration
├── run-tests.sh        # Linux/Mac test runner
├── run-tests.ps1       # Windows test runner
├── vulnerable-app/     # Vulnerable version
│   ├── app.py
│   ├── Dockerfile
│   └── requirements.txt
└── patched-app/        # Fixed version
    ├── app.py
    ├── Dockerfile
    └── requirements.txt

References

  • https://github.com/Dolibarr/dolibarr
  • https://github.com/Dolibarr/dolibarr/blob/23.0.4/htdocs/core/modules/import/import_csv.modules.php#L925
  • https://github.com/Dolibarr/dolibarr/commit/24b1b99c89c79a3fe2d1e83b22dc1810cf0fa6e1
  • https://www.vulncheck.com/advisories/dolibarr-before-24.0.0-sql-injection-via-the-csv-and-xlsx-import-update-keys

Generated by PoC Generator on 2026-08-30T08:52:42.836396134

Frequently asked questions

What is CVE-2026-81728?

CVE-2026-81728 is a High (8.1) vulnerability: Dolibarr before 24.0.0 contains a SQL injection in its CSV and XLSX import wizard.. This entry ships a detection-only PoC and a Docker test lab.

How do I detect CVE-2026-81728?

Run the detection-only PoC included with this entry against your Docker test lab to confirm whether a target is affected; pair it with your own IDS logging.

How do I block or mitigate CVE-2026-81728?

Upgrade to a fixed version per the vendor advisory; the NVD record lists the affected versions. Use the included PoC to verify your remediation.


For authorized security testing and research only. See the full source and NVD record.