Skip to main content

wger CVE-2026-43948

CRITICAL
Incorrect Authorization (CWE-863)
2026-05-06 https://github.com/wger-project/wger GHSA-mhc8-p3jx-84mm
9.9
CVSS 3.1 · GitHub Advisory
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Authenticate as gym manager with gym=None
  2. Delivery
    Enumerate target user IDs with gym=None
  3. Exploit
    Send GET request to /en/gym/user/<target_pk>/reset-user-password
  4. Install
    Server bypasses authorization check (None != None
  5. C2
    False)
  6. Execute
    Server generates random password
  7. Impact
    Server saves password to target account
  8. Step 8
    Extract plaintext password from HTTP response body
  9. Step 9
    Authenticate as victim using stolen password
  10. Step 10
    Victim permanently locked out

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Authorization logic validation
MITRE ATT&CK

1 technique across 1 tactic: Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Attacker must possess an authenticated wger account with the gym.manage_gym permission assigned AND have their userprofile.gym field set to None (no gym assignment). Victim must also have userprofile.gym=None. The gym=None state is the default for newly registered users before manual gym assignment, making the victim pool substantial in any public-registration deployment. The gym.manage_gym permission is designed to be delegated to non-admin users for operational gym management tasks, satisfying the attacker privilege prerequisite in typical deployments. Exploitation is limited to the GET endpoints /en/gym/user/<user_pk>/reset-user-password and /en/gym/user/<user_pk>/edit - attackers must know or enumerate valid user primary keys (user_pk). No special network configuration is required beyond standard HTTP/HTTPS access to the wger application (AV:N). No user interaction is required (UI:N) - the attacker can directly send HTTP requests without victim participation. The vulnerability DOES NOT affect cross-gym attacks where attacker and victim have different non-null gym assignments (scenario C in PoC confirms HTTP 403 returned when gym=1 != gym=2), limiting exploitation to the specific None-None comparison case. This is NOT a generic bypass of all authorization - it specifically exploits Python's None identity semantics in Django ORM object comparison.

Impact

This vulnerability represents an authentic critical risk despite requiring low privileges. CVSS 9.9 accurately reflects the severity: network-accessible (AV:N), low complexity (AC:L), requires only low privilege (PR:L) via delegated gym.manage_gym permission, no user interaction (UI:N), and critically includes scope change (S:C) representing cross-tenant boundary violation with complete confidentiality/integrity/availability impact (C:H/I:H/A:H). The scope change metric is the key differentiator - attackers can compromise accounts outside their intended authorization domain, a fundamental security boundary violation in multi-tenant systems. Real-world exploitability is high: every wger deployment with public registration creates gym=None users by default, and the gym.manage_gym permission is designed to be delegated to non-admin users for operational management, satisfying both preconditions. GitHub advisory confirms vendor acknowledgment and provides working proof-of-concept with reproducible three-scenario RBAC test protocol. No EPSS or KEV data provided, but the combination of public advisory, detailed exploit steps, low technical barrier, and pip package distribution channel (pkg:pip/wger) suggests high weaponization potential. Patch available in version 2.6 per CPE data (vulnerable: <= 2.5, fixed: 2.6). The vulnerability enables permanent account lockout as victims' original passwords are invalidated during the reset, increasing availability impact beyond typical credential theft scenarios. Risk is somewhat constrained by the need for attacker to have gym.manage_gym permission, but this is an intended operational role, not a privileged security boundary.

Exploit ScenarioDerived

A fitness business deploys wger for multi-gym management and assigns a regional trainer the gym.manage_gym permission to handle member administration, but leaves the trainer's gym field unassigned (gym=None) during initial account setup. The trainer discovers they can access /en/gym/user/<user_pk>/reset-user-password for other gym=None users (including newly registered members awaiting gym assignment or administrative accounts). The trainer sends a GET request to /en/gym/user/2/reset-user-password with their authenticated session cookie. The server bypasses the authorization check due to None != None evaluating to False, generates a new password, saves it to user ID 2's account, and returns the plaintext password in the HTML response: <td>xK9mP2qR</td>. The trainer immediately logs in as user ID 2 using the leaked password, gaining full access to the victim's workout data, personal information, and administrative functions if the victim was an admin. The victim is permanently locked out as their original password no longer works, and they have no notification that their account was compromised. No proof-of-concept code is publicly circulating per available intelligence, but the GitHub advisory provides complete exploitation steps, lowering the technical barrier for skilled attackers.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 06, 2026

Complete account takeover in wger Python fitness management platform allows authenticated gym managers with no gym assignment (gym=None) to reset passwords of any other unaffiliated user and receive the new plaintext password in the HTTP response body. The vulnerability stems from a Django ORM authorization check that incorrectly evaluates None != None as False, bypassing the tenant isolation guard. Newly registered users default to gym=None state, making every public-registration wger deployment vulnerable. CVSS 9.9 Critical severity with scope change (cross-tenant impersonation). GitHub advisory GHSA-mhc8-p3jx-84mm confirms exploitation requires only low privilege (delegated gym.manage_gym permission) with no user interaction, enabling permanent victim lockout as original passwords are invalidated.

RemediationAI

Upgrade to wger version 2.6 or later immediately, which corrects the authorization logic to use raw foreign key integer comparison (gym_id) with explicit None guards. Installation via pip: pip install --upgrade wger>=2.6. For Docker deployments, update to wger/server image tags corresponding to version 2.6 or later. Verify patch application by inspecting wger/gym/views/user.py to confirm the authorization check now reads: if trainer_gym_id is None or trainer_gym_id != member_gym_id: return HttpResponseForbidden(). If immediate patching is not feasible, implement the following compensating controls with their respective trade-offs: (1) Revoke gym.manage_gym permission from all users with gym=None until they are assigned to a specific gym - this breaks legitimate gym manager workflows but eliminates attacker preconditions; (2) Implement application firewall rules to block HTTP GET requests to /*/gym/user/*/reset-user-password and /*/gym/user/*/edit endpoints for users with gym=None in their session profile - requires custom session inspection and may have performance impact; (3) Enforce mandatory gym assignment during user registration/onboarding, preventing gym=None state entirely - requires process changes and may impact registration flows. All compensating controls introduce operational friction. Patching to version 2.6 is the only complete remediation. After patching, audit application logs for historical access to the vulnerable endpoints by users with gym=None to identify potential prior exploitation. Consider forcing password resets for all gym=None users created before patch deployment. Advisory and patch information: https://github.com/wger-project/wger/security/advisories/GHSA-mhc8-p3jx-84mm.

Affected Packages

pypi wger fix: 2.6

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

wger is a Django-based open-source fitness and workout management platform distributed as a Python pip package. The vulnerability resides in wger/gym/views/user.py where two views (reset_user_password and gym_permissions_user_edit) implement multi-tenant authorization checks using Django ORM ForeignKey object comparison (request.user.userprofile.gym != user.userprofile.gym). When both attacker and victim have no gym assignment, both expressions evaluate to None, and Python's identity comparison None != None returns False, causing the HttpResponseForbidden() guard to be bypassed. Django's ORM returns None for null ForeignKey relationships rather than a distinct sentinel value, making object comparison semantically incorrect for null-safe authorization checks. The gym field represents tenant boundaries in wger's multi-gym architecture, and gym=None is the default state for newly registered users before manual gym assignment. CWE-863 (Incorrect Authorization) applies as the authorization logic fails to properly validate scope boundaries when null values are present. The vulnerable pattern appears across five views sharing the same authorization check structure, indicating a systemic design flaw in how the codebase handles tenant isolation for unaffiliated users. The password_generator() function creates a new plaintext password that is both saved to the database via user.set_password() and rendered directly into the user/trainer_login.html template response body, enabling immediate credential theft without additional steps.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

GitHub Advisory PRIMARY 9.9 CRITICAL
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Primary rating from GitHub Advisory · only source for this CVE.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

DescriptionGitHub Advisory

Summary

The reset_user_password and gym_permissions_user_edit views in wger perform a gym-scope authorization check using Python object comparison (!=) that evaluates None != None as False, silently bypassing the guard when both the attacker and victim have no gym assignment (gym=None). A user with gym.manage_gym permission and gym=None can reset the password of any other gym=None user; the new plaintext password is returned verbatim in the HTML response body, enabling one-shot full account takeover. The victim's original password is invalidated, locking them out permanently.

Details

File: wger/gym/views/user.py

The authorization guard in reset_user_password (and the parallel check in gym_permissions_user_edit) uses Django ORM object comparison:

python
# VULNERABLE - wger/gym/views/user.py
if request.user.userprofile.gym != user.userprofile.gym:
    return HttpResponseForbidden()

When both request.user.userprofile.gym and user.userprofile.gym are None (representing users with no gym assignment - the default for newly registered users before gym linking), Python evaluates None != None as False. The guard therefore passes without raising HttpResponseForbidden, and execution continues unconditionally to:

python
password = password_generator()
user.set_password(password)
user.save()
return render(request, 'user/trainer_login.html', {'password': password, ...})

The generated password is rendered verbatim in the response body.

Affected endpoints:

  • GET /en/gym/user/<user_pk>/reset-user-password -> wger.gym.views.user.reset_user_password
  • GET /en/gym/user/<user_pk>/edit -> wger.gym.views.user.gym_permissions_user_edit

Suggested patch:

diff
--- a/wger/gym/views/user.py
+++ b/wger/gym/views/user.py
-    if request.user.userprofile.gym != user.userprofile.gym:
-        return HttpResponseForbidden()
+    trainer_gym_id = request.user.userprofile.gym_id
# raw FK int
+    member_gym_id  = user.userprofile.gym_id
+
+    if trainer_gym_id is None or trainer_gym_id != member_gym_id:
+        return HttpResponseForbidden()

The _id suffix accesses the raw integer foreign key, bypassing Python's object identity semantics. The explicit is None guard rejects unaffiliated trainers immediately, regardless of the victim's gym status. Apply the same same_gym() helper pattern to all five views sharing this check: reset_user_password, gym_permissions_user_edit, admin_notes_list, documents_list, contracts_list.

PoC

Tested on wger/server:latest Docker image (runtime: Django 5.2.13). Two test users: trainer1 (gym.manage_gym permission, userprofile.gym=None) and alice (regular user, userprofile.gym=None).

Step 1 - Authenticate as trainer with manage_gym permission and gym=None:

POST /en/user/login HTTP/1.1
Host: target
Content-Type: application/x-www-form-urlencoded

username=trainer1&password=[REDACTED]&csrfmiddlewaretoken=[REDACTED]

-> 302 Found; Set-Cookie: sessionid=[trainer1_session]

Step 2 - Trigger cross-tenant password reset:

GET /en/gym/user/2/reset-user-password HTTP/1.1
Host: target
Cookie: sessionid=[trainer1_session]

-> 200 OK
<tr><th>Password</th><td>[GENERATED_PLAINTEXT_PASSWORD]</td></tr>

Step 3 - Authenticate as victim (alice) using leaked password:

POST /en/user/login HTTP/1.1
Host: target

username=alice&password=[GENERATED_PLAINTEXT_PASSWORD]&csrfmiddlewaretoken=[...]

-> 302 Found; authenticated as alice
(alice's ORIGINAL password is now invalid - permanent lockout)

RBAC Disproof Protocol (three-scenario test):

  • Scenario A (admin, same-gym) -> HTTP 200 (expected - documented feature)
  • Scenario B (trainer1 gym=None -> alice gym=None) -> HTTP 200 with plaintext password in body (expected HTTP 403)
  • Scenario C (trainer1 gym=1 -> alice gym=2) -> HTTP 403 (expected - guard works when gyms differ, confirms bypass is None-specific)

Reproducibility: 2/2 runs after clean-baseline database reset.

Impact

An attacker with gym.manage_gym permission and gym=None can:

  1. Reset the password of any other gym=None user on the wger instance.
  2. Receive the new plaintext password in the HTTP response body.
  3. Log in as the victim immediately.
  4. Permanently lock the victim out (original password invalidated).

Affected deployments: every wger instance where gym.manage_gym permission is delegated to non-admin users AND any other users exist with gym=None. The gym=None state is the default for newly registered users before manual gym assignment, so every public-registration wger instance is affected.

Severity: Critical (CVSS 9.9). Network-reachable, low complexity, requires only low privilege (delegated trainer), scope change (impersonation of other tenant), complete confidentiality/integrity/availability loss for all unaffiliated accounts.

This is the same structural bug class as the sibling finding affecting trainer_login (submitted separately). The root cause - Django ORM object-!= returning False when both sides are None - appears across five views and warrants a shared same_gym() helper.

Executive ViewAI

Why It Matters

CVE-2026-43948 is a critical account takeover vulnerability in wger fitness management platform affecting all deployments with public user registration. Attackers with low-privilege gym manager roles can reset passwords for any unaffiliated user and receive plaintext credentials, enabling complete account compromise and permanent lockout of legitimate users across tenant boundaries.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Disable public user registration to prevent creation of gym=None accounts; (2) restrict gym.manage_gym permission to users with explicit tenant assignment; (3) implement authentication logging and alerting on all password reset events; (4) enforce multi-factor authentication for all user accounts to prevent credential-based lockout attacks; (5) conduct immediate audit of password reset activity in application logs for indicators of compromise.

Threat Intelligence Overview

EPSS Score
0.0%
Top 98% exploitable
Threat Intel
1
1 source
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
Very High

Priority Score

50
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +50
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

Affected Products (CPE)GitHub Advisory

pkg:pip/wger

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy