Summary
Dolibarr's Users REST API may allow an authenticated user with user-modification and password rights to change a SuperAdmin account's password. If the API does not properly authorize changes to privileged accounts, the user could take over the administrator account.
Affected context
The issue is in the put() method of Dolibarr's Users REST API. It may affect deployments where an authenticated API user has user-modification and password rights, and the endpoint does not enforce adequate authorization when changing a SuperAdmin's password. The description identifies Dolibarr ERP CRM versions before 24.0.2 as affected.
Exploit preconditions
- Attack surface: The Users REST API.
- Required access: An authenticated API account with user-modification and password rights.
- Trigger point: A password change request handled by the users endpoint's
put()method. - Why exploitation is possible: Authorization checks may not adequately prevent the user from changing a SuperAdmin account's password.
Why this happens
The API's authorization logic does not sufficiently restrict which accounts an otherwise authorized user can modify. This is an authorization enforcement failure mapped to CWE-863: Incorrect Authorization: possession of general user and password rights may permit an operation on a more privileged account without an adequate target-specific permission check.
Potential impact
- An attacker with the required access may change a SuperAdmin password.
- The attacker could log in as the administrator and gain elevated privileges.
- Administrative access may enable further changes to users, settings, or business data.
- The incident could affect the confidentiality, integrity, or availability of ERP data and services.
General mitigation guidance
Defensive patterns focus on enforcing authorization for each operation and target account:
- Apply server-side, target-specific permission checks to password changes, especially for privileged accounts.
- Separate routine user-management rights from authority to modify administrator credentials.
- Use secure, dedicated administrative account-recovery and credential-change flows.
- Minimize API users' permissions and require stronger controls for sensitive account changes.
- Validate authorization before applying changes, and record sensitive operations for review.
How teams detect issues like this
- Review API handlers for password-update paths that rely on broad user-modification permissions without checking the target account's privilege level.
- Use static analysis and code review to identify missing or inconsistent authorization checks across user-management endpoints.
- Monitor audit logs for password changes to administrator accounts, particularly when initiated by non-administrative API users.
- Enforce policies requiring explicit authorization tests for sensitive account-management operations.

