
Proof-of-concept and differential lab for CVE-2026-104882, a Contao CSV import IDOR where a scoped non-admin editor overwrites out-of-scope tl_content records.
| CVE | CVE-2026-104882 |
| Component | contao/core-bundle — BackendCsvImportController (Backend::getBackendModule key-action dispatch) |
| Affected | < 5.3.50 |
| Fixed in | 5.3.50 — commit eb8088bcd (GHSA-23w9-4pg3-xwm3) |
| CWE | CWE-639 (Authorization Bypass Through User-Controlled Key), CWE-863 (Incorrect Authorization) |
| Impact | A non-admin editor scoped to certain pages/forms can overwrite the tableitems / listitems / options of arbitrary tl_content / tl_form_field records outside their scope via the CSV import wizards — blind integrity IDOR (the written value is serialize() of a plain string array, not object injection) |
| Vector | Authenticated low-privilege backend editor invoking a CSV import key-action |
| Trigger | CSV import targeting an out-of-scope record (only module-level access checked) |
The vulnerable controller wrote the imported data with no per-record vote:
// vulnerable BackendCsvImportController::importFromTemplate
$data = $this->fetchData($uploader, $separator, $callback);
$this->connection->update($table, [$field => serialize($data)], ['id' => $currentRecord['id']]);
// no denyAccessUnlessGranted — only the module-level check ran at dispatch
The fix enforces the per-record voter before the write:
// fixed (commit eb8088bcd)
$this->denyAccessUnlessGranted(
ContaoCorePermissions::DC_PREFIX.$table,
new UpdateAction($table, $currentRecord, [$field => serialize($data)])
);
$this->connection->update($table, [$field => serialize($data)], ['id' => $currentRecord['id']]);
Custom backend module "key" actions are dispatched in
Backend::getBackendModule() after only the module-level
USER_CAN_ACCESS_MODULE check — no per-record voter runs. The CSV import
wizards (importListWizardAction, importTableWizardAction,
importOptionWizardAction) therefore wrote the imported listitems /
tableitems / options directly to the database without verifying that the
editor may modify the targeted record. A non-admin editor scoped to specific
pages/forms could target any tl_content / tl_form_field record by id and
overwrite its content — a blind integrity IDOR. The fix adds
denyAccessUnlessGranted(DC_PREFIX.$table, new UpdateAction(...)) before
connection->update, so the per-record DataContainer voter is enforced on the
import path.
| service | image | role |
|---|---|---|
csv-vuln | cve-2026-104882:vuln | real BackendCsvImportController (pre-fix) |
csv-fixed | cve-2026-104882:fixed | real controller (vendor fix eb8088bcd) |
poc | cve-2026-104882-poc:local | stdlib-only Python driver |
A PHP harness loads the real controller verbatim from each tag and drives
importTableWizardAction() as a non-admin. The per-record authorization
checker is mocked to deny an out-of-scope record; the Doctrine connection is
mocked to record writes. The Symfony/Contao infrastructure is stubbed; the
controller logic (including the security decision and the DB write) is the
real upstream code. Both sides differ only in the controller source.
./run-lab.sh build # builds both sides (php:8.3-cli)
./run-lab.sh up # cve104882lab network: csv-vuln / csv-fixed
./run-lab.sh sweep
./run-lab.sh down
poc/poc.py (stdlib only):
tl_content.tableitems.eb8088bcd.A standalone full-chain exploit ships at exploit/exploit.py:
python3 exploit/exploit.py --host=csv-vuln
# exit 1 on confirmed out-of-scope write, 0 on a safe target
| import scope | csv-vuln (pre-fix) | csv-fixed (eb8088bcd) |
|---|---|---|
| out-of-scope | db_update_called=true (IDOR) | access_denied=true, no write |
| in-scope (control) | write (legitimate) | write (legitimate) |
Captured runs: evidence/check-*-run.txt, evidence/exploit-*-run.txt,
evidence/probe-*-run.txt, evidence/mitigation-*-run.txt,
evidence/exploit-standalone-run.txt, evidence/exploit-standalone-fixed-run.txt,
evidence/versions.txt, evidence/0day-sweep.txt.
cve104882lab
network; PHP 8.3 runtime in the lab images.The fixed controller enforces the per-record UpdateAction vote
(denyAccessUnlessGranted) before any CSV-import DB write, so out-of-scope
records are protected while in-scope imports still succeed. The same guard
covers importListWizardAction / importTableWizardAction /
importOptionWizardAction (listitems / tableitems / options). No
per-record IDOR remains in the import path.
README.md this write-up
run-lab.sh environment driver (build / up / sweep / down)
Makefile convenience targets
poc/poc.py the PoC (check / exploit / probe / mitigation)
exploit/exploit.py standalone full-chain exploit
lab/lab.Dockerfile builds both sides from upstream controller source
lab/vendor/ verbatim controller from pre-fix / fix commits
lab/stubs.php minimal Symfony/Contao/Doctrine infrastructure stubs
lab/harness.php drives the real import action as a non-admin
lab/service.py HTTP wrapper (POST /import)
evidence/ captured runs of every mode on both sides
TRACKING.md excluded (working record)