CVE-2026-81729: Dolibarr before 23.0.4 Incorrect Authorization on REST API Document Deletion

Published Aug 27, 2026
·
Updated

Dolibarr before 23.0.4 authorizes REST API document deletion against the wrong permission. Documents::delete() in htdocs/api/class/apidocuments.class.php calls dolchecksecureaccessdocument() with the mode argument 'read' when handling DELETE /api/index.php/documents, while the sibling builddoc() path passes 'write', the correct mode for an operation that modifies stored data. An authenticated API user who holds only a read permission for a document-bearing module, for example societe:lire or facture:lire, and no create, write, delete or admin permission, therefore passes the check and can permanently delete that module's documents: third-party files, invoices, orders, proposals, project files and generated PDFs, with no recovery path. The call site is htdocs/api/class/apidocuments.class.php:1276 in 23.0.3 and passes 'write' from 23.0.4 onward.

Affected Software

1 affected component
dolibarr Dolibarr<23.0.4

Event History

Aug 27, 2026
CVE Published
via MITRE·08:07 PM
Data Sourced
via MITRE·08:07 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which users can exploit this issue?

An authenticated REST API user with only read permission for a document-bearing module can exploit it. Examples include users with societe:lire or facture:lire who have no create, write, delete, or administrative permission.

2

Which stored files can be deleted?

Affected users can permanently delete documents belonging to modules they can read, including third-party files, invoices, orders, proposals, project files, and generated PDFs. The described deletion has no recovery path.

3

How can I determine whether an installation is affected?

Dolibarr versions before 23.0.4 are affected. In 23.0.3, the DELETE documents handler at htdocs/api/class/api_documents.class.php line 1276 passes read to the access check; 23.0.4 and later pass write.

4

What can be done if upgrading is not immediately possible?

Prevent read-only users from using the REST API endpoint for document deletion by removing their API access or their relevant module read permissions. The issue requires an authenticated API user with document-module read permission.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203