Summary
Movary contains a missing authorization control in its user-management endpoints that allows any authenticated user to access functionality intended only for administrators.
By sending requests to /settings/users, a non-admin user can enumerate all accounts and create a new administrator, effectively escalating their privileges within the application.
Affected context
This vulnerability occurs in Movary deployments where:
- The application is exposed to multiple authenticated users (e.g., shared or multi-user instances).
- Users authenticate via standard web sessions and receive valid session cookies.
- The
/settings/usersendpoints are reachable through the web interface or directly via HTTP requests.
The issue is triggered when these endpoints rely on flawed server-side checks that fail to ensure the caller is an administrator before processing user-management operations.
Exploit preconditions
- Attack surface: HTTP(S) endpoints, specifically
/settings/usersand related user-management routes. - Required access: Any valid authenticated user account with a working session cookie.
- Trigger point: Sending requests to the user-management endpoints (e.g., listing users, creating accounts) that should be restricted to administrators.
- Why exploitation is possible:
- The route definitions do not enforce admin-only middleware or guards.
- The controller-level authorization check uses a broken boolean condition, so non-admin sessions pass the check and are treated as administrators.
Why this happens
The underlying bug is an authorization logic error aligned with CWE-863: Incorrect Authorization.
Instead of consistently enforcing admin-only checks at the routing or middleware layer, the application relies on controller-level conditions that are both incomplete and incorrectly implemented.
A flawed boolean expression—such as improperly combined role checks, inverted logic, or fall-through behavior—causes the authorization mechanism to accept any authenticated user for admin-only operations.
This reflects a broader class of issues where sensitive functionality is exposed without robust, centralized access control enforcement, allowing privilege escalation through normal application workflows.
Potential impact
- A regular user may create a new administrator account under their control.
- An attacker could enumerate all user accounts, including usernames and potentially associated metadata.
- Existing user accounts may be modified (e.g., roles, status) if additional admin actions are exposed.
- Application configuration or sensitive data accessible to administrators could be viewed or altered.
- Trust in the instance's integrity and auditability can be undermined, especially on multi-user installations.
General mitigation guidance
Effective mitigation focuses on consistent, centralized authorization for privileged operations:
- Introduce and enforce dedicated admin-only middleware or guards at the routing layer for all user-management and configuration endpoints.
- Use a single, well-tested authorization helper or policy to check administrative roles rather than duplicating boolean logic across controllers.
- Apply an explicit allowlist of roles/permissions for sensitive endpoints (e.g., "admin" or equivalent), and deny by default if checks fail or context is missing.
- Design role and permission checks to be simple, explicit comparisons, avoiding complex nested boolean expressions where subtle errors are more likely.
- Implement least-privilege role design so that ordinary users never need access to administrative actions, reducing the blast radius of any future mistakes.
How teams detect issues like this
Detection typically combines code-level review with behavioral testing:
- Perform focused code reviews on all routes and controllers that expose administrative or configuration functionality, verifying that:
- Admin-only middleware or guards are present.
- Controller-level checks match the intended access policy.
- Use static analysis rules or custom linters to:
- Flag privileged endpoints that lack explicit role checks.
- Detect duplicated or complex authorization conditions that are prone to logic errors.
- Implement automated tests (unit, integration, or security tests) that:
- Attempt admin-only actions using low-privilege accounts and expect explicit denial.
- Validate that newly added routes cannot be accessed without the appropriate role.
- Consider integrating application-level monitoring and logging to:
- Record role and endpoint usage.
- Alert when non-admin users successfully invoke endpoints classified as administrative.

