Summary
Movary versions prior to 0.71.1 contain a missing authorization check that allows any logged-in user to promote their own account to administrator via the user settings API.
By sending a crafted request that sets the isAdmin field on their own user record, an ordinary user can gain full administrative privileges without any additional validation.
Affected context
This vulnerability occurs in the Movary web application's user profile update endpoint, specifically the PUT /settings/users/{userId} API.
The endpoint is intended for standard profile edits by authenticated users but also accepts and persists changes to the privileged isAdmin field.
The issue is present when the backend does not distinguish between regular profile updates and administrative role changes, and does not enforce an explicit admin-only authorization check on that field.
Exploit preconditions
- Attack surface: HTTP API endpoint
PUT /settings/users/{userId}exposed to authenticated users. - Required access: Valid, non-admin user account with ability to authenticate and call the settings endpoint for their own
userId. - Trigger point: Sending a profile update request that includes
isAdmin=true(or equivalent privileged role attribute) for the caller's own user record. - Why exploitation is possible: The server-side handler trusts that any authenticated user may modify all fields on their own user object, and does not perform a separate authorization check or server-side filtering for the privileged
isAdminfield before persisting the update.
Why this happens
The underlying flaw is a classic missing authorization problem where access control decisions are not enforced on a sensitive operation.
In this case, the handler for updating user settings does not implement a distinct permission check for modifying administrative status, treating it like any other editable profile field.
This maps to CWE-862: Missing Authorization, where a resource or action that should be restricted to administrators is exposed to any authenticated user, because the application relies on client-side behavior or assumptions instead of enforcing server-side role checks.
Potential impact
- A regular user account can become an administrator and gain full control over the Movary instance.
- An attacker may access and modify other users' data, including ratings, watch history, and profile information.
- Administrative configuration and maintenance functions of the application can be abused or disrupted.
- Auditability and trust in user activity and stored data can be undermined due to unauthorized admin-level changes.
General mitigation guidance
Effective mitigation focuses on enforcing server-side, role-based authorization for any action that alters privileges or other sensitive attributes.
Recommended patterns include:
- Introducing explicit authorization checks on endpoints and fields that control roles, permissions, or account states, ensuring only administrators can change them.
- Separating ordinary profile updates from administrative user management into different endpoints or service methods, each with clearly defined access requirements.
- Implementing server-side whitelisting of fields that regular users are allowed to modify, rejecting or ignoring any client-supplied changes to privileged fields like
isAdmin. - Applying a centralized access control layer or policy engine that consistently evaluates the caller's role and the sensitivity of the requested operation.
- Designing default configurations so that privilege-related attributes are immutable by non-admin users, regardless of client-side behavior.
How teams detect issues like this
To detect similar vulnerabilities, organizations can use a combination of review and testing approaches:
- Code review: Look for user update endpoints that accept entire user objects or role flags and verify that modifications to admin/privilege fields are gated by role checks or policy enforcement.
- Static analysis: Configure rules to flag direct assignments to role or privilege fields (
isAdmin,role,permissions, etc.) that occur without adjacent authorization checks. - Access control testing: In automated or manual tests, attempt privilege escalation by editing own user records and including privilege-related fields, confirming that the server rejects unauthorized changes.
- Policy enforcement: Use an authorization library or service that externalizes and logs access decisions, making it easier to detect unexpected paths where sensitive attributes can be updated.

