# CVE-2026-27838: wger (Low 3.1)

🐍

🐍 PyPI

Not in CISA KEV

LOW severity

# CVE-2026-27838 — wger

LOW [Fix: wger-project/wger@e964328](https://github.com/wger-project/wger/commit/e964328784e2ee2830a1991d69fadbce86ac9fbf)

CVE-2026-27838 is a low-severity (CVSS 3.1) CWE-639 vulnerability in wger. The records list no fixed version yet; check the vendor advisory below and apply the mitigations in the meantime.

wger: IDOR via user-unscoped cache keys on routine API actions exposes workout data

Also known as[GHSA-42cr-w2gr-m54q](/vulnerability/GHSA-42cr-w2gr-m54q)PYSEC-2026-3418

Published

Feb 26, 2026

Updated

Oct 28, 2026

Affected

1 pkg

Patched

See advisory

Exploits

None indexed

Exploitation data as of Nov 10, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

## Exploitation Status

### Proof-of-concept exploit code exists

-   CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-27838.

## EPSS Exploitation Probability

[via FIRST.org ↗](https://www.first.org/epss/)

0.3%probability of exploitation in next 30 days

Lower Risk0.00%

Lower risk than most CVEs22th percentile — riskier than 22% of all scored CVEsHighest risk

0.00%0.26%0.53%0.79%0.0%0.3%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from [FIRST.org EPSS](https://www.first.org/epss/).

## How urgent is this, really

## Where this sits among everything scored

## Real-World Exposure

1 pkg affected

🐍`wger`

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

## Description

#### Summary

Five routine detail action endpoints check a cache before calling `self.get_object()`. Cache keys are scoped only by `pk` — no user ID is included. When a victim has previously accessed their routine via the API, an attacker can retrieve the cached response for the same PK without any ownership check.

#### Details

`wger/manager/api/views.py` — five actions follow this pattern (lines 134–201):

```
@action(detail=True)
def date_sequence_display_mode(self, request, pk=None):
    cache_key = make_routine_api_date_sequence_display_cache_key(pk)
    cached = cache.get(cache_key)
    if cached:
        return Response(cached)   # returned WITHOUT calling self.get_object()
    # only reaches ownership check on cache miss
    routine = self.get_object()
    ...
```

Cache key construction in `wger/utils/cache.py:89–106`:

```
def make_routine_api_date_sequence_display_cache_key(routine_id):
    return f"routine-api-date-sequence-display-{routine_id}"
    # No user ID in key
```

Cache TTL: 1 month (`4 * 604800` seconds, `settings_global.py:461`).

Affected endpoints:

```
GET /api/v2/routine/{pk}/date-sequence-display/
GET /api/v2/routine/{pk}/date-sequence-gym/
GET /api/v2/routine/{pk}/structure/
GET /api/v2/routine/{pk}/logs/
GET /api/v2/routine/{pk}/stats/
```

#### PoC

```
1. Victim (user A) visits GET /api/v2/routine/5/structure/ → response cached under key "routine-api-structure-5"
2. Attacker (user B) visits GET /api/v2/routine/5/structure/ → cache hit → returns user A's routine structure without any ownership check
```

Requires the victim to have previously accessed the endpoint (cache must be populated). Once populated, the cache entry is valid for 1 month.

#### Impact

An attacker with a registered account can retrieve another user's routine details — workout day sequences, exercise structure, training logs, and statistics — from cache without ownership verification.

**Fix**: Include the user ID in the cache key:

```
def make_routine_api_date_sequence_display_cache_key(routine_id, user_id):
    return f"routine-api-date-sequence-display-{user_id}-{routine_id}"
```

Or move `self.get_object()` before the cache lookup so ownership is always verified first.

## Affected Packages

1 total

Ecosystem

Package

Vulnerable range

Fix

🐍PyPI

`wger` 

all versions

No fix

## Affected Products

1 product · 1 configurations

Application

`wger`wger

≤ 2.4

range

## Detection & mitigation playbook

Open-source dependency

1.  ### Detect
    
    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for wger, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
    
2.  ### Remediation status
    
    The records we use list no patched version of wger for CVE-2026-27838. Check the maintainer's advisory, and where your build allows, override or pin the dependency away from the vulnerable range.
    
3.  ### Mitigate without a patch
    
    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
    

## Frequently Asked Questions

\### Summary Five routine detail action endpoints check a cache before calling \`self.get\_object()\`. Cache keys are scoped only by \`pk\` — no user ID is included. When a victim has previously accessed their routine via the API, an attacker can retrieve the cached response for the same PK without any ownership check. ### Details \`wger/manager/api/views.py\` — five actions follow this pattern (lines 134–201): \`\`\`python @action(detail=True) def date\_sequence\_display\_mode(self, request, pk=None): cache\_key = make\_routine\_api\_date\_sequence\_display\_cache\_key(pk) cached = cache.get(cache\_key)

O3 Security · Impact-Aware SCA

### Is CVE-2026-27838 in your dependencies?

Find it across PyPI, including transitive dependencies.

[Scan my dependencies](/book-demo) [How O3 SCA works](/impact-aware-sca)