VYPR
High severity7.6NVD Advisory· Published Apr 17, 2026· Updated Apr 24, 2026

CVE-2026-40474

CVE-2026-40474

Description

wger is a free, open-source workout and fitness manager. In versions 2.5 and below, the GymConfigUpdateView declares permission_required = 'config.change_gymconfig' but inherits WgerFormMixin instead of WgerPermissionMixin, so the permission is never enforced at runtime. Since GymConfig is an ownerless singleton, any authenticated user can modify the global gym configuration, triggering save() side effects that bulk-update user profile gym assignments — a vertical privilege escalation to installation-wide configuration control. This issue is fixed in version 2.5.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
wgerPyPI
<= 2.1

Affected products

1
  • cpe:2.3:a:wger:wger:*:*:*:*:*:*:*:*
    Range: <2.5

Patches

1
47ee5af93b3c

Properly protect the gym config view

https://github.com/wger-project/wgerRoland GeiderApr 11, 2026via ghsa
1 file changed · +6 2
  • wger/config/views/gym_config.py+6 2 modified
    @@ -24,19 +24,23 @@
     
     # wger
     from wger.config.models import GymConfig
    -from wger.utils.generic_views import WgerFormMixin
    +from wger.utils.generic_views import (
    +    WgerFormMixin,
    +    WgerPermissionMixin,
    +)
     
     
     logger = logging.getLogger(__name__)
     
     
    -class GymConfigUpdateView(WgerFormMixin, UpdateView):
    +class GymConfigUpdateView(WgerPermissionMixin, WgerFormMixin, UpdateView):
         """
         Generic view to edit the gym config table
         """
     
         model = GymConfig
         fields = ('default_gym',)
    +    login_required = True
         permission_required = 'config.change_gymconfig'
         success_url = reverse_lazy('gym:gym:list')
         title = gettext_lazy('Edit')
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.