wger: Cross-User Data Corruption via Missing Ownership Check on WorkoutLog.slot_entry
### Summary An authenticated attacker can inject arbitrary workout log entries into any other user's `SlotEntry` by supplying the victim's `slot_entry` ID in a `POST /api/v2/workoutlog/` request. The `slot_entry` foreign key is not included in the ownership verification performed by `WorkoutLogViewSet.get_owner_objects()`, so the server accepts and persists the cross-user reference without error. Because `SlotEntry.get_config_data()` retrieves associated logs via `self.workoutlog_set.all()` with **no user filter**, the attacker's injected data is silently folded into the victim's progressive-overload calculations, corrupting their auto-generated weight and repetition targets. ### Details wger uses a centralized ownership-verification pattern in `WgerOwnerObjectModelViewSet.create()` (file: `wger/utils/viewsets.py`). This method iterates over the list returned by each ViewSet's `get_owner_objects()` and verifies that every listed foreign-key value in the request belongs to the authenticated user. **Foreign keys not present in the list are never checked.** `WorkoutLogViewSet.get_owner_objects()` returns: ```python # File: wger/manager/api/views.py, lines 312-316 def get_owner_objects(self): return [(Routine, 'routine'), (WorkoutSession, 'session')] # ^^^^^^^ checked ^^^^^^^^^^^^^^^ checked # (SlotEntry, 'slot_entry') is MISSING ``` Because `slot_entry` is omitted, an attacker can supply their own `routine` (which passes the ownership check) alongside a victim's `slot_entry` ID
- Products
- wger
- Affected versions
- 1.1, 1.1.1, 1.2, 1.2rc1, 1.3, 1.4, 1.5, 1.6, 1.6.1, 1.7, 1.8, 1.9, 2.0, 2.1
- Fixed versions
- Not specified
- CVEs
- CVE-2026-46438
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 30 Oct 2026, 18:13 UTC · Revision 1
Source evidence
wger: Cross-User Data Corruption via Missing Ownership Check on WorkoutLog.slot_entry
core-osv · Original sourcePublished 15 Oct 2026, 10:22 UTC
### Summary An authenticated attacker can inject arbitrary workout log entries into any other user's `SlotEntry` by supplying the victim's `slot_entry` ID in a `POST /api/v2/workoutlog/` request. The `slot_entry` foreign key is not included in the ownership verification performed by `WorkoutLogViewSet.get_owner_objects()`, so the server accepts and persists the cross-user reference without error. Because `SlotEntry.get_config_data()` retrieves associated logs via `self.workoutlog_set.all()` with **no user filter**, the attacker's injected data is silently folded into the victim's progressive-overload calculations, corrupting their auto-generated weight and repetition targets. ### Details wger uses a centralized ownership-verification pattern in `WgerOwnerObjectModelViewSet.create()` (file: `wger/utils/viewsets.py`). This method iterates over the list returned by each ViewSet's `get_owner_objects()` and verifies that every listed foreign-key value in the request belongs to the authenticated user. **Foreign keys not present in the list are never checked.** `WorkoutLogViewSet.get_owner_objects()` returns: ```python # File: wger/manager/api/views.py, lines 312-316 def get_owner_objects(self): return [(Routine, 'routine'), (WorkoutSession, 'session')] # ^^^^^^^ checked ^^^^^^^^^^^^^^^ checked # (SlotEntry, 'slot_entry') is MISSING ``` Because `slot_entry` is omitted, an attacker can supply their own `routine` (which passes the ownership check) alongside a victim's `slot_entry` ID
osv:PYSEC-2026-4314
wger
Fixed versions: Not specified
Complete source record
{
"id": "19965b783ed41c91fceabf5395bb4aa272dbdd187873a6014738e74366fcac59",
"url": "https://osv.dev/vulnerability/PYSEC-2026-4314",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "wger: Cross-User Data Corruption via Missing Ownership Check on WorkoutLog.slot_entry",
"summary": "### Summary An authenticated attacker can inject arbitrary workout log entries into any other user's `SlotEntry` by supplying the victim's `slot_entry` ID in a `POST /api/v2/workoutlog/` request. The `slot_entry` foreign key is not included in the ownership verification performed by `WorkoutLogViewSet.get_owner_objects()`, so the server accepts and persists the cross-user reference without error. Because `SlotEntry.get_config_data()` retrieves associated logs via `self.workoutlog_set.all()` with **no user filter**, the attacker's injected data is silently folded into the victim's progressive-overload calculations, corrupting their auto-generated weight and repetition targets. ### Details wger uses a centralized ownership-verification pattern in `WgerOwnerObjectModelViewSet.create()` (file: `wger/utils/viewsets.py`). This method iterates over the list returned by each ViewSet's `get_owner_objects()` and verifies that every listed foreign-key value in the request belongs to the authenticated user. **Foreign keys not present in the list are never checked.** `WorkoutLogViewSet.get_owner_objects()` returns: ```python # File: wger/manager/api/views.py, lines 312-316 def get_owner_objects(self): return [(Routine, 'routine'), (WorkoutSession, 'session')] # ^^^^^^^ checked ^^^^^^^^^^^^^^^ checked # (SlotEntry, 'slot_entry') is MISSING ``` Because `slot_entry` is omitted, an attacker can supply their own `routine` (which passes the ownership check) alongside a victim's `slot_entry` ID ",
"evidence": "osv:PYSEC-2026-4314",
"products": [
{
"name": {
"value": "wger",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.1",
"evidence": "/affected/0/versions"
},
{
"value": "1.1.1",
"evidence": "/affected/0/versions"
},
{
"value": "1.2",
"evidence": "/affected/0/versions"
},
{
"value": "1.2rc1",
"evidence": "/affected/0/versions"
},
{
"value": "1.3",
"evidence": "/affected/0/versions"
},
{
"value": "1.4",
"evidence": "/affected/0/versions"
},
{
"value": "1.5",
"evidence": "/affected/0/versions"
},
{
"value": "1.6",
"evidence": "/affected/0/versions"
},
{
"value": "1.6.1",
"evidence": "/affected/0/versions"
},
{
"value": "1.7",
"evidence": "/affected/0/versions"
},
{
"value": "1.8",
"evidence": "/affected/0/versions"
},
{
"value": "1.9",
"evidence": "/affected/0/versions"
},
{
"value": "2.0",
"evidence": "/affected/0/versions"
},
{
"value": "2.1",
"evidence": "/affected/0/versions"
}
]
}
],
"severity": "medium",
"structured": {
"id": "PYSEC-2026-4314",
"aliases": [
"CVE-2026-46438",
"GHSA-rjpf-7pf5-q54x",
"PYSEC-2026-4314"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"last_affected": "2.1"
}
]
}
],
"package": {
"name": "wger",
"purl": "pkg:pypi/wger",
"ecosystem": "PyPI"
},
"versions": [
"1.1",
"1.1.1",
"1.2",
"1.2rc1",
"1.3",
"1.4",
"1.5",
"1.6",
"1.6.1",
"1.7",
"1.8",
"1.9",
"2.0",
"2.1"
],
"database_specific": {
"source": "https://github.com/pypa/advisory-database/blob/main/vulns/wger/PYSEC-2026-4314.yaml"
}
}
],
"modified": "2026-10-15T14:45:10.345926009Z",
"provider": "osv",
"references": [
"https://github.com/wger-project/wger/security/advisories/GHSA-rjpf-7pf5-q54x",
"https://github.com/wger-project/wger",
"https://github.com/wger-project/wger/releases/tag/2.6",
"https://pypi.org/project/wger",
"https://github.com/advisories/GHSA-rjpf-7pf5-q54x",
"https://nvd.nist.gov/vuln/detail/CVE-2026-46438"
]
},
"related_cves": [
{
"value": "CVE-2026-46438",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 332648,
"published_at": "2026-10-15T10:22:47.153748+00:00"
}