/

CVE-2026-40350

Severity:

HIGH RISK

(8.8)

Access Control / Authorization in Movary User Management

CVE-2026-40350

Analyzed

Vulnerability type

Category:

Access Control / Authorization

CWE:

CWE-863

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 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/users endpoints 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/users and 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.

Sources

SourceLink
github.comgithub.com/leepeuker/movary/commit/92c7400486f5fe9f350046e04e45a8502778bf39
github.comgithub.com/leepeuker/movary/pull/749
github.comgithub.com/leepeuker/movary/releases/tag/0.71.1
github.comgithub.com/leepeuker/movary/security/advisories/GHSA-7r3f-9fwv-p43w

Frequently asked

questions

Yes, if the Movary instance is network-accessible and an attacker can obtain any valid user account, they can exploit the issue purely via HTTP requests to the affected endpoints.

The attacker needs only a standard authenticated user account with a valid session cookie; no prior administrative privileges are required.

The most robust approach is to centralize authorization with admin-only middleware or policy checks on all privileged routes, backed by clear, minimal role/permission definitions and deny-by-default behavior for sensitive operations.

Adopt a systematic access-control strategy: define roles and permissions up front, enforce them via shared helpers or middleware, add automated tests that exercise admin endpoints with low-privilege users, and use code review or static analysis to ensure no privileged route is left unguarded.

Find out what's already
exploitable in your codebase.