/

CVE-2026-40349

Severity:

HIGH RISK

(8.8)

Missing Authorization in Movary User Settings API

CVE-2026-40349

Analyzed

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Privilege Escalation to Administrator

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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 isAdmin field 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.

Sources

SourceLink
github.comgithub.com/leepeuker/movary/commit/12c8a090051b1a1c07a3aa48922f3bc9ffe44c8b
github.comgithub.com/leepeuker/movary/pull/750
github.comgithub.com/leepeuker/movary/releases/tag/0.71.1
github.comgithub.com/leepeuker/movary/security/advisories/GHSA-mcfq-8rx7-w25v

Frequently asked

questions

Yes. Any user with network access to the Movary web interface or API and a valid non-admin account can exploit it by sending a crafted HTTP request, without needing local access to the server.

The attacker must be able to authenticate as a regular user. Once logged in, they can call the user settings endpoint for their own account and attempt to set the isAdmin (or equivalent) flag.

The safest pattern is to enforce strict server-side authorization around any change to roles or administrative flags, typically by moving such operations into dedicated admin-only endpoints and validating the caller's role before applying changes. Regular profile update endpoints should simply ignore or reject any attempts to modify privileged fields.

Prevention relies on a consistent, centralized access control strategy: define which roles may perform which operations, implement field-level authorization where necessary, avoid trusting the client for privilege-related data, and include automated tests and reviews specifically targeting privilege escalation paths.

Find out what's already
exploitable in your codebase.