Summary
Dolibarr's expense report payment endpoints may fail to verify that an authenticated user is authorized to access the specific report payment they request. A user with expense report read and create rights could potentially read, create, or modify payments belonging to other users, including falsifying reimbursement state.
Affected context
The issue occurs in Dolibarr's api_expensereports.class.php payment endpoints, including getAllPayments, getPayments, addPayment, and updatePayment. It may affect deployments in the stated vulnerable version ranges when these endpoints do not enforce ownership or equivalent authorization checks for each requested expense report payment.
Exploit preconditions
- Attack surface: The expense report payment API endpoints must be reachable.
- Required access: An authenticated account with expense report read and create rights.
- Trigger point: A request to retrieve, add, or update a payment through an affected endpoint.
- Why exploitation is possible: The endpoints may rely on general permissions without adequately checking whether the user is authorized for the specific report payment.
Why this happens
The underlying issue is an object-level authorization failure. When an endpoint accepts a payment or expense report identifier, it must verify that the authenticated user may perform the requested action on that specific object. Failing to make this check can allow access across users' records, mapping to CWE-639: Authorization Bypass Through User-Controlled Key.
Potential impact
- Authenticated users may be able to view other users' expense report payments.
- Users may be able to create or modify payment records outside their authorization scope.
- Reimbursement status and related financial records could be falsified.
- Organizations may face inaccurate accounting records and loss of trust in reimbursement workflows.
General mitigation guidance
Defensive patterns focus on enforcing authorization for every object-level operation, rather than relying only on endpoint-level permissions.
- Apply ownership or role-based checks to each payment and its associated expense report.
- Use secure-by-default authorization policies that deny access unless explicitly granted.
- Derive object access from the authenticated user's permitted scope instead of trusting client-supplied identifiers alone.
- Limit account privileges to the minimum required and keep payment creation and modification permissions distinct where practical.
- Validate authorization before returning or changing payment data, and record sensitive operations for audit.
How teams detect issues like this
- Review API handlers for payment lookups or mutations that use user-controlled identifiers without object-level authorization checks.
- Use static analysis or code review rules to flag database access and update operations lacking a nearby permission check.
- Test authorization policies to confirm users cannot access or change records outside their permitted scope.
- Monitor audit logs for unusual cross-user payment access or unexpected changes to reimbursement records.

