Skip to content

← Actionable
Medium, CVSS 5.4amended

wger: trainer_login accepts GET - CSRF bypass enables forced session rebinding

CVE-2026-45161GHSA-xf64-4pmc-h8qf

What to do

Vendor response not established. Follow the primary source's mitigation guidance and check back for a fix.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • PyPI wger

    Affected
    <= 2.1
    Fixed in
    no fixed version recorded

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
5.4 · CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
EPSS
  • CVE-2026-45161: 0.09% estimated exploitation activity in the next 30 days; percentile 0.35 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary The trainerlogin view in wger accepts GET requests and executes djangologin() without any CSRF protection, because Django's CsrfViewMiddleware only enforces tokens on unsafe methods (POST/PUT/PATCH/DELETE). An attacker can embed a single <img tag on a malicious page; when an authenticated trainer loads that page, their browser auto-issues the GET with the session cookie, forcibly rebinding the trainer's session to an arbitrary user account. Details File: wger/core/views/user.py, approximately lines 161-210 Because the view handles GET, Django's CSRF middleware does not validate any token. An attacker can place <img src="https://wger.target/en/user/2/trainer-login" on any web page. When an authenticated trainer's browser loads that page, it issues the GET request with the session cookie attached (SameSite=Lax does not block same-site top-level navigation and subresource hops triggered by same-origin redirects). The server executes djangologin() and issues a new session cookie…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 3 · amended ·

    Amended from ghsa record GHSA-xf64-4pmc-h8qf

  2. Revision 2 · amended ·

    Amended from osv record GHSA-xf64-4pmc-h8qf

  3. Revision 1 · created ·

    Published from ghsa record GHSA-xf64-4pmc-h8qf

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-45161

Advisory: wger: trainer_login accepts GET - CSRF bypass enables forced session rebinding
IDs: CVE-2026-45161, GHSA-xf64-4pmc-h8qf
Record: https://patchnext.com/advisories/cve-2026-45161 (revision 3, source checked 26 Oct 2026, 13:55 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 5.4)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor response not established. A vendor fix does not mean a deployment is fixed.

## Affected components
- PyPI wger: affected <= 2.1

## Suggested inspection (read-only)
- `python -m pip show wger`: prints the installed version. Run with the environment that serves production active.

## Supported action
No complete vendor fix is recorded. Follow the primary source's mitigation guidance and check this record again before closing anything.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on wger.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-xf64-4pmc-h8qf (GitHub-reviewed advisory GHSA-xf64-4pmc-h8qf lists affected ranges: PyPI wger >=0 <=2.1)
- Verified: https://osv.dev/vulnerability/GHSA-xf64-4pmc-h8qf (OSV record GHSA-xf64-4pmc-h8qf lists affected ranges: PyPI wger >=0 <=2.1)

Commands are suggestions: review each one before running it.

Loading voting…