Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. wger
  4. ›
  5. CVE-2026-40474

CVE-2026-40474: wger has Broken Access Control in Global Gym Configuration Update Endpoint

April 16, 2026

wger exposes a global configuration edit endpoint at /config/gym-config/edit implemented by GymConfigUpdateView. The view declares permission_required = 'config.change_gymconfig' but does not enforce it because it inherits WgerFormMixin (ownership-only checks) instead of the project’s permission-enforcing mixin (WgerPermissionMixin) .

The edited object is a singleton (GymConfig(pk=1)) and the model does not implement get_owner_object(), so WgerFormMixin skips ownership enforcement. As a result, a low-privileged authenticated user can modify installation-wide configuration and trigger server-side side effects in GymConfig.save().

This is a vertical privilege escalation from a regular user to privileged global configuration control. The application explicitly declares permission_required = ‘config.change_gymconfig’, demonstrating that the action is intended to be restricted; however, this requirement is never enforced at runtime.

References

  • github.com/advisories/GHSA-xppv-4jrx-qf8m
  • github.com/wger-project/wger
  • github.com/wger-project/wger/security/advisories/GHSA-xppv-4jrx-qf8m
  • nvd.nist.gov/vuln/detail/CVE-2026-40474

Code Behaviors & Features

Detect and mitigate CVE-2026-40474 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 2.1

Solution

Unfortunately, there is no solution available yet.

Impact 7.6 HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:L

Learn more about CVSS

Weakness

  • CWE-284: Improper Access Control
  • CWE-862: Missing Authorization

Source file

pypi/wger/CVE-2026-40474.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Thu, 16 Apr 2026 12:20:36 +0000.