/

CVE-2026-46434

Severity:

HIGH RISK

(7.1)

Improper Privilege Management (CWE-269) in wger App

CVE-2026-46434

Deferred

Vulnerability type

Category:

Improper Privilege Management

CWE:

CWE-269

Impact:

Unauthorized account deactivation and administrative disruption

Severity:

HIGH RISK

(7.1)

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

A privilege-management flaw in wger before version 2.6 allows a user with only the gym_trainer permission to deactivate other accounts in the same gym.

Because the authorization check accepts several permissions with OR logic and does not enforce role hierarchy, a lower-privileged user may disable gym_manager or general_gym_manager accounts.

Affected context

The issue occurs in wger deployments before version 2.6 when the UserDeactivateView is used to deactivate accounts within a gym. The view accepts any one of several gym-related permissions but does not verify that the acting user has authority equal to or greater than the target account.

Exploit preconditions

  • Attack surface: The account-deactivation functionality exposed by the application
  • Required access: An authenticated account with the gym_trainer permission
  • Target condition: The target account belongs to the same gym and may have a higher-privileged role
  • Trigger point: A request to the UserDeactivateView
  • Why exploitation is possible: Authorization uses OR logic across permissions without a privilege-hierarchy or target-role check

Why this happens

The underlying bug is an authorization design failure in which possession of any accepted permission is treated as sufficient to perform a sensitive action. The implementation does not compare the requester's role with the target user's role or enforce a minimum authority level before deactivation.

This maps to CWE-269: Improper Privilege Management, because the application permits a lower-privileged principal to perform an administrative operation against a higher-privileged account.

Potential impact

  • A gym trainer may deactivate manager accounts
  • Administrative users may lose access to the application
  • Gym operations and account administration could be disrupted
  • An attacker could cause denial of service for affected users
  • Recovery and incident-response workloads may increase

General mitigation guidance

Mitigation generally focuses on enforcing explicit authorization boundaries for sensitive account actions.

Common defensive patterns include:

  • Require a dedicated permission or role for account deactivation
  • Enforce privilege hierarchy checks between the acting user and target account
  • Deny self-service or cross-role administrative actions unless explicitly intended
  • Apply least privilege to gym-level roles and administrative functions
  • Use deny-by-default authorization for destructive account operations
  • Centralize authorization decisions so role comparisons are consistently applied
  • Treat permission combinations as security policy rather than relying on broad OR logic

How teams detect issues like this

Organizations can identify similar issues through:

  • Static analysis and code review of authorization mixins and permission decorators
  • Review of destructive endpoints for missing target-resource authorization checks
  • Tests that attempt lower-privileged actions against higher-privileged accounts
  • Policy checks requiring explicit role-hierarchy validation for administrative operations
  • Audit-log monitoring for account deactivations performed by unexpected roles
  • Automated security review tools that flag broad OR-based permission checks

Sources

SourceLink
github.comgithub.com/wger-project/wger/releases/tag/2.6
github.comgithub.com/wger-project/wger/security/advisories/GHSA-x249-cx55-2h87

Frequently asked

questions

An authenticated user with the gym_trainer permission may be able to exploit it when the target account is in the same gym and the deployment is affected.

No. The described behavior requires only the lower-privileged gym_trainer permission, although access to the account-deactivation function is still required.

Enforce a dedicated authorization decision for deactivation that checks both the actor's permissions and the target account's role, including an appropriate privilege hierarchy.

Use deny-by-default authorization, centralize role and permission checks, and include negative tests confirming that lower-privileged users cannot modify or disable higher-privileged accounts.

Find out what's already
exploitable in your codebase.