Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as trainer (gym=None, delegated perms)
-
DeliveryRequest /gym/notes/list/user/<id> for unaffiliated user
-
ExploitNone != None guard silently passes
-
ExecutionQueryset returns victim PII
-
ImpactEnumerate PKs to mass-harvest notes/documents/contracts
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 | Exploitation requires an authenticated account holding BOTH the gym.gym_trainer AND gym.add_adminusernote Django permissions, with that account's userprofile.gym set to None (unassigned). The target victim must ALSO have userprofile.gym=None - the bug is specifically triggered because Python evaluates None != None as False, so the guard only fails open when both operands are None (confirmed by the advisory's Scenario C, where a gym-assigned admin correctly receives HTTP 403). The dominant real-world enabler is that gym=None is the DEFAULT state for newly registered users prior to manual gym assignment, so every wger instance with public registration that also delegates trainer permissions to non-admins is affected. Limiting factors: the attacker must first acquire the two specific delegated permissions (not available to ordinary members by default), and same-gym or cross-gym (gym-assigned) reads are correctly blocked, so the exposure is confined to the pool of unassigned (gym=None) accounts. |
| Impact | This is a genuine access-control defect (CWE-863) rather than an inflated high-CVSS issue, but its real-world urgency is moderate and gated by preconditions. The provided CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N, base 7.1) is internally consistent with the description: network-reachable web endpoints, low attack complexity, and a privileged-but-non-admin (PR:L) trainer account. No EPSS score, no CISA KEV entry, and no separate POC flag were supplied in the structured feeds; however, the GitHub Security Advisory (GHSA-c72h-82w6-rqfp) itself embeds a fully reproducible proof-of-concept (tested on wger/server:latest, 2/2 runs after DB reset), so working exploit detail is effectively public. Signals therefore align rather than conflict: moderate-to-high technical impact (cross-tenant disclosure of PII - salary, medical, contract data) but constrained by the requirement that the attacker already hold two delegated permissions (gym.gym_trainer + gym.add_adminusernote) and that both attacker and victim have gym=None. Because gym=None is the default state for newly registered users, any public-registration instance that delegates trainer permissions is realistically exposed. Note a data gap: the structured package metadata lists 'vulnerable <= 2.1, fixed in None,' while the references point to release 2.6 - the exact fixed version is not confirmed and should be verified against the advisory/release. |
| Exploit ScenarioDerived | On a self-hosted wger instance with open registration, an attacker obtains (or is delegated) a trainer account that has gym.gym_trainer and gym.add_adminusernote permissions but no gym assigned (gym=None). Because the gym-scope guard evaluates None != None as False, the attacker simply requests /en/gym/notes/list/user/<id>, /en/gym/documents/list/<id>, and /en/gym/contract/list/<id> for other default-state users and receives their private admin notes, uploaded documents, and contracts. A fully reproducible PoC is published in the vendor's GitHub Security Advisory, including PK enumeration (1..N) to harvest every gym=None account. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 07, 2026
Cross-tenant information disclosure in wger allows an authenticated trainer account that holds both the gym.gym_trainer and gym.add_adminusernote permissions but has no gym assignment (userprofile.gym = None) to read private admin notes, uploaded documents, gym contracts, user configuration and permission data belonging to any other unassigned (gym = None) user on the same instance. The root cause is an authorization guard that fails open: the five affected views compare gym objects with the Python operator '!=', and 'None != None' evaluates to False, so HttpResponseForbidden is never reached and the following queryset is filtered only by the attacker-supplied member_id. Rated CVSS 7.1 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N, authenticated, low privilege), the bug is amplified because gym = None is the default state for newly registered users, so any instance with public registration plus delegated trainer permissions is exposed; a detailed proof-of-concept is documented in the published GitHub advisory and the permission-edit endpoint is also reachable, giving a possible privilege-escalation path, though no confirmed in-the-wild exploitation has been reported.
RemediationAI
Apply the vendor fix from GitHub advisory GHSA-c72h-82w6-rqfp, which replaces the 'gym_a != gym_b' object comparison with an explicit null check on gym_id plus an identity comparison (rejecting any trainer whose gym_id is None), adds a tenant-scoped secondary filter to each queryset, and centralizes the logic in a shared assert_same_gym() helper; upgrade to a wger release that contains this change (the advisory references the 2.6 release tag, and note that 2.6 introduces breaking changes including MFA/social-auth re-login requirements, so test in staging first). Because the release-note data does not pin an exact patched version string, verify the deployed code contains the null-safe gym_id check after upgrading. If immediate upgrade is not possible, apply these compensating controls in order of effectiveness: (1) Stop delegating gym.gym_trainer and gym.add_adminusernote to non-admin users - keep trainer capabilities restricted to staff admins until patched - which removes the attacker's required permission set entirely, at the cost of losing delegated gym administration; (2) eliminate the gym=None population by auto-assigning every newly registered user to a concrete gym (or by making gym assignment part of the registration/approval workflow) so that None-vs-None comparisons cannot occur - this eliminates the bypass but changes onboarding behavior and requires a data migration for existing unassigned accounts; (3) temporarily disable public self-registration so new gym=None accounts cannot be created; and (4) as a stopgap at the edge, block or require staff authentication on the five affected URL prefixes (/gym/notes/list/user/, /gym/documents/list/user/, /gym/contract/list/, /gym/user/*/config, /gym/user/*/permissions) via reverse-proxy or middleware rules - this is brittle because it relies on URL patterns rather than the underlying authorization fix and may break legitimate same-gym trainer workflows. Treat any unassigned account as a potential victim and review logs for enumeration of sequential member ids against these endpoints, since disclosure of admin notes, ID scans, medical forms and contract/financial data is not reversible after the fact.
Affected VersionsENISA
Affected Packages
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 gym and fitness management application distributed as the pip package wger (CPE pkg:pip/wger); the flaw sits in the gym module's view layer across wger/gym/views/user.py, admin_notes.py, document.py, contract.py and user_config.py. Each of the five views implements a tenant check in the form 'if request.user.userprofile.gym != user.userprofile.gym: return HttpResponseForbidden()'. In Python, comparing two None values with '!=' returns False, so when both the requesting trainer and the targeted member have userprofile.gym = None (the unassigned/default state), the guard is silently skipped. The code then executes a Django ORM query such as 'AdminUserNote.objects.filter(member=member)' which is keyed solely on the attacker-controlled member id, with no secondary filter tying rows to the requester's tenant (e.g. '__userprofile__gym_id'). This is CWE-863 (Incorrect Authorization): the authorization decision is made against a nullable tenant attribute using value equality rather than an explicit null check plus identity comparison, and it is duplicated rather than centralized, so the same defect drifts across multiple views. The advisory's Scenario C confirms the guard behaves correctly when gyms actually differ (a gym-assigned admin receives HTTP 403 for an unassigned target), demonstrating that the bypass is specifically a None-vs-None equality artifact rather than a wholesale missing check. The advisory's proposed fix promotes the comparison to gym_id foreign keys, rejects a null trainer gym outright, adds a tenant-scoped secondary filter to the querysets, and recommends extracting a shared assert_same_gym(trainer, member) helper to prevent recurrence.
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
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N
Remote web endpoints (AV:N, AC:L); attacker needs a delegated trainer account, so PR:L not PR:N; no UI; same authority (S:U); high PII disclosure (C:H) with limited permission-edit integrity impact (I:L) and no availability loss.
Primary rating from Vendor (https://github.com/wger-project/wger).
CVSS VectorVendor: https://github.com/wger-project/wger
Lifecycle Timeline
2DescriptionCVE.org
Summary
Five gym management views in wger apply a flawed gym-scope guard (gym_a != gym_b) that silently passes when both operands are None. A trainer with gym.gym_trainer and gym.add_adminusernote permissions and no gym assignment (gym=None) can read private admin notes, uploaded documents, gym contracts, user configuration, and user permission data for any other unaffiliated user on the instance. The subsequent querysets filter only on the attacker-supplied member_id with no secondary gym-scoped validation, so all records are disclosed.
Details
Files: wger/gym/views/user.py, wger/gym/views/admin_notes.py, wger/gym/views/document.py, wger/gym/views/contract.py, wger/gym/views/user_config.py
The same flawed comparison pattern appears across at least five views:
# VULNERABLE - applied in admin_notes_list, documents_list, contracts_list,
# user_config, and gym_permissions_user_edit
if request.user.userprofile.gym != user.userprofile.gym:
return HttpResponseForbidden()
# After the guard (admin notes example):
notes = AdminUserNote.objects.filter(member=member)
# only filtered by member_idWhen both request.user.userprofile.gym and user.userprofile.gym are None, Python evaluates None != None as False, and HttpResponseForbidden is never reached. The subsequent queryset applies only the attacker-supplied member (user ID) as a filter - there is no secondary check tying the queryset to the requesting trainer's gym. All private admin notes, documents, and contracts for the target user are returned in the response body.
Affected endpoints:
GET /en/gym/notes/list/user/<member_pk>-> admin notes list viewGET /en/gym/documents/list/user/<member_pk>-> documents list viewGET /en/gym/contract/list/<member_pk>-> contracts list viewGET /en/gym/user/<member_pk>/config-> user config viewGET /en/gym/user/<member_pk>/permissions-> permission edit view
Suggested patch:
--- 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
+ member_gym_id = user.userprofile.gym_id
+
+ if trainer_gym_id is None or trainer_gym_id != member_gym_id:
+ return HttpResponseForbidden()
# Also tighten the queryset with a gym-scoped secondary filter:
- notes = AdminUserNote.objects.filter(member=member)
+ notes = AdminUserNote.objects.filter(
+ member=member,
+ member__userprofile__gym_id=request.user.userprofile.gym_id,
+ )Extract a shared helper assert_same_gym(trainer, member) and call it consistently from all five affected views to eliminate future drift.
PoC
Tested on wger/server:latest Docker image. Test users: trainer1 (gym.gym_trainer + gym.add_adminusernote permissions, userprofile.gym=None) and alice (regular user, userprofile.gym=None, has a private admin note pre-seeded).
Step 1 - Authenticate as trainer with required perms 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 - Read victim's private admin notes:
GET /en/gym/notes/list/user/2 HTTP/1.1
Host: target
Cookie: sessionid=[trainer1_session]
-> 200 OK
body contains all private admin notes for user 2:
"PRIVATE_NOTE_ABOUT_ALICE_SALARY_50K"
"PHASE4_SECRET_SALARY_100K"Step 3 - Read victim's documents and contracts (same pattern):
GET /en/gym/documents/list/user/2
GET /en/gym/contract/list/2
-> 200 OK for each; all records disclosedStep 4 (optional) - Mass enumeration across all gym=None users:
Iterate user PKs 1..N:
GET /en/gym/notes/list/user/{uid}
-> 200 = gym=None victim (notes leaked)
-> 403 = gym-assigned user (check works correctly when gym values differ)RBAC Disproof Protocol:
- Scenario A (admin, gym=1 -> member gym=1) -> HTTP 200 (expected - same-gym read is a documented feature)
- Scenario B (trainer1, gym=None -> alice gym=None) -> HTTP 200 with PII in body (expected HTTP 403)
- Scenario C (admin, gym=1 -> alice gym=None) -> HTTP 403 (expected - guard works when gyms differ; confirms bypass is
None-specific)
Reproducibility: 2/2 runs after clean-baseline database reset.
Impact
An authenticated trainer with gym.gym_trainer + gym.add_adminusernote permissions and userprofile.gym=None can:
- Enumerate and read all private admin notes for every other
gym=Noneuser (notes may contain salary data, medical notes, disciplinary records). - Download all uploaded documents attached to those users (contracts, ID scans, medical forms).
- Read all gym contracts (financial terms, subscription details).
- Read user configuration details.
- Via the permissions endpoint, potentially modify victim permissions (creates a privilege escalation path - not fully explored in this submission but the endpoint is reachable).
Affected deployments: every wger instance where gym.gym_trainer + gym.add_adminusernote are 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: High (CVSS 7.1). Network-reachable, low complexity, requires only low privilege (delegated trainer), scope unchanged (same wger authority), high confidentiality loss across all unaffiliated accounts, low integrity impact (permission-edit view reachable).
This is structurally the same bug class as the sibling findings affecting trainer_login and reset_user_password (submitted separately). The root cause - Django ORM object-!= returning False when both sides are None - warrants a shared same_gym() helper applied across all five views.
Articles & Coverage 1
Technical POC Analysis
CWE-863 (Incorrect Authorization), a fail-open scope guard.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
wger, an open-source gym management platform, contains a high-severity information disclosure vulnerability that allows an authenticated trainer with specific permissions and no gym assignment to access sensitive data-including private admin notes, uploaded documents, gym contracts, and user configuration-belonging to other unassigned users. This cross-tenant exposure affects organizations that enable public registration and delegate trainer permissions, potentially leading to privacy breaches, regulatory non-compliance, and reputational damage. Leadership should prioritize immediate mitigation because the default state for new users (no gym assignment) amplifies the risk, and a publicly available exploit code exists.
No vendor-released patch identified at time of analysis. Interim mitigations: 1) Remove gym.gym_trainer and gym.add_adminusernote permissions from all users without a gym assignment. 2) Disable public registration or require admin approval with immediate gym assignment. 3) Implement custom authorization checks that explicitly handle None values (e.g., use 'is not' instead of '!='). 4) Monitor access logs for unauthorized access to admin notes, documents, or user configuration. 5) Restrict network access to wger instances to trusted users only.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
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
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-94328
GHSA-c72h-82w6-rqfp
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB