Feb 27, 2026·6 min read·65 visits
The wger API forgot to filter database queries by the current user. Authenticated attackers can query specific endpoints to dump the repetition configurations (sets, reps, workout structure) of all users on the instance.
A classic Insecure Direct Object Reference (IDOR) vulnerability in the wger Workout Manager allows authenticated users to access the repetition configurations of every other user on the platform. Due to a failure to filter API querysets by the requesting user, the application serves up the entire database's workout structure to anyone with a valid account.
Let's talk about wger (pronounced however you want, though I lean towards 'wager' that you'll skip leg day). It is the open-source, self-hostable answer to those subscription-heavy fitness apps that hold your data hostage. It manages your workouts, your nutrition, and your progress. It’s a fantastic tool for privacy-conscious gym rats who want to own their data.
But in versions up to 2.4, wger decided that 'community' meant 'radical transparency.' Imagine walking into a gym locker room where every single locker is wide open, and the personal diaries of every member are taped to the doors. That is essentially what happened here.
The vulnerability is a textbook Insecure Direct Object Reference (IDOR), or what the OWASP Top 10 now fancies calling Broken Object Level Authorization (BOLA). While the CVSS score is a modest 4.3 (because apparently, knowing how much your neighbor benches isn't 'Critical' infrastructure damage), the logic flaw represents a fundamental failure in API design. It turns a private workout tracker into a public broadcast system.
Where did the developers go wrong? They fell victim to the path of least resistance in the Django Rest Framework (DRF). DRF is powerful; it automates a lot of the heavy lifting involved in serializing database objects into JSON. But it also gives you enough rope to hang yourself if you aren't paying attention to scoping.
In a proper multi-tenant application (or multi-user, in this case), every single database query regarding user data should have a WHERE clause. You want SELECT * FROM workouts WHERE user_id = current_user. If you forget that WHERE clause, the database happily returns everything.
The flaw in wger was located in the RepetitionsConfigViewSet and MaxRepetitionsConfigViewSet. These views are responsible for serving up the nitty-gritty details of a workout—how many reps, what configuration, etc. Instead of filtering the queryset based on self.request.user, the code simply called .all(). It’s the SQL equivalent of shouting 'EVERYONE!' when asked who is in the room.
Let’s look at the code. It is almost painful in its simplicity. This is the vulnerable implementation found in wger/manager/api/views.py:
# VULNERABLE CODE
class RepetitionsConfigViewSet(viewsets.ModelViewSet):
def get_queryset(self):
# "Here, have everything. I trust you."
return RepetitionsConfig.objects.all()
class MaxRepetitionsConfigViewSet(viewsets.ModelViewSet):
def get_queryset(self):
return MaxRepetitionsConfig.objects.all()See that objects.all()? That is the sound of privacy dying. There is no check to see if the user requesting the data actually owns it. If you have a valid token, you get the list.
Now, let's look at the fix introduced in commit 1fda5690b35706bb137850c8a084ec6a13317b64. The developers switched to a custom base class that likely enforces ownership, and they explicitly filtered the query:
# PATCHED CODE
class RepetitionsConfigViewSet(WgerOwnerObjectModelViewSet):
def get_queryset(self):
# "Who are you again? Oh, right. Here is YOUR stuff."
return RepetitionsConfig.objects.filter(
slot_entry__slot__day__routine__user=self.request.user
)The patch creates a join chain (slot_entry -> slot -> day -> routine -> user) to verify that the config actually belongs to the person asking for it. This is how it should have been from day one.
Exploiting this does not require a complex buffer overflow or some wizard-level ROP chain. It requires curl and a registered account. Since wger is often deployed with open registration, the barrier to entry is non-existent.
Step 1: Get in the door. Register an account on the target instance. Log in to get your API token.
Step 2: Ask politely. Send a GET request to the vulnerable endpoint. The API uses sequential IDs (because of course it does), so enumeration is trivial, but you don't even need to iterate IDs here—the list endpoint returns the collection.
# The "Hacker" Tooling
curl -H "Authorization: Token <YOUR_TOKEN>" \
https://wger-instance.com/api/v2/repetitions-config/Step 3: Parse the loot. The server responds with a JSON array containing every repetition configuration in the database. You now have the workout structure for every user: specific exercises, rep counts, and routine data. If the IDs are sequential, you can map these configurations back to specific routines and potentially correlate them with specific users if other IDORs exist (which, let's be honest, they probably do).
I can hear the detractors now: "So what? They know I do 3 sets of 10. Big deal." And sure, this isn't a dump of credit card numbers or medical records (though health data is protected class in many jurisdictions).
However, consider the context. People use these apps to track progress, physical limitations, and rehabilitation routines. In a competitive environment (say, a sports team using a self-hosted instance), leaking the exact training regimen of your athletes to a rival is a strategic disaster.
Furthermore, this is a privacy violation. Users expect their data to be siloed. If I can see your workout configs, I can infer your activity levels, your schedule, and potentially your location habits if the metadata is rich enough. It is a breach of trust, plain and simple.
The remediation is straightforward, but it requires diligence. If you are running wger, you need to pull the latest docker image or update your source code immediately. The fix is live in the main branch.
For developers, the lesson is clear: Never trust the client, and never trust the default queryset.
get_queryset in DRF to filter by request.user unless the data is explicitly public.CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
wger wger-project | <= 2.4 | commit 1fda569 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-639 |
| Attack Vector | Network (API) |
| CVSS v3.1 | 4.3 (Medium) |
| Impact | Information Disclosure |
| Exploit Status | PoC Available |
| Authentication | Required (Low Privilege) |
A denial-of-service vulnerability exists in the Go library github.com/insomniacslk/dhcp within the dhcpv4/nclient4 subpackage. In affected versions, the raw packet parsing function BroadcastRawUDPConn.ReadFrom subtracts the fixed 8-byte UDP header length from the IPv4 payload length declared in the packet header without first verifying that the declared payload length is at least 8 bytes. An unauthenticated attacker on an adjacent local network segment can broadcast or unicast a malformed IPv4 packet with a declared payload length between 0 and 7 bytes, causing a signed integer underflow that passes a negative slice bound into buf.Consume and triggers an unhandled Go runtime panic.
CVE-2026-63305 (GHSA-g9x9-q7qj-6mv5) is an operating system command injection vulnerability affecting WWBN AVideo (formerly YouPHPTube) versions up to and including 29.0. The defect resides in the standalone FFmpeg execution handler at plugin/API/standAlone/ffmpeg.json.php. When assembling asynchronous post-processing commands, the script concatenates the notifyCode and callback properties from a decrypted payload directly into a shell command string without sanitization. An attacker capable of providing or forging a valid encrypted execution payload can inject shell metacharacters to achieve remote code execution under the privileges of the web server user.
The cakephp/twig-view plugin integrates the Twig templating engine into the CakePHP framework. Prior to versions 1.3.3 and 2.1.2, the UtilsExtension class exposes PHP's native unserialize() function as a Twig filter without restricting allowed classes. When untrusted data is passed into the unserialize filter within a template, an attacker can trigger PHP Object Injection and execute Property-Oriented Programming (POP) gadget chains, leading to arbitrary code execution or data manipulation.
CVE-2026-63402 is a prototype-chain traversal and shared built-in object corruption vulnerability in the i18next internationalization framework for JavaScript prior to version 26.3.4. The flaw resides in the deepExtend utility function within src/utils.js, which uses the JavaScript 'in' operator to verify property existence on target objects. When an application passes untrusted resource bundles to i18next.addResourceBundle() with both the deep and overwrite parameters set to true, an attacker can traverse into inherited methods on Object.prototype and overwrite properties on shared built-in function objects, causing process-wide denial of service.
CVE-2026-58262 (tracked internally as KLR-04 and via GitHub Security Advisory GHSA-f9h7-4mmq-vgcq) is a cryptographic verification and consensus quorum bypass vulnerability in Klever-Go (`klever-io/klever-go`), the Go implementation of the Klever blockchain protocol. Prior to version 1.7.20, the block header signature verification logic (`HeaderSigVerifier.verifyConsensusSize`) counts all set bits across the entire `PubKeysBitmap` byte slice toward the required two-thirds validator quorum without masking or validating unused trailing padding bits in the final byte. Because the underlying Boneh-Lynn-Shacham (BLS) multi-signature verification function (`blsMultiSigner.Verify`) iterates strictly over the indices of configured validator public keys, it ignores any bits set at indices beyond the active consensus group size. When the consensus group size is not an exact multiple of 8, a compromised or malicious block producer can set these unused trailing padding bits to artificially inflate the apparent signer count by up to 7 signatures, enabling blocks with fewer genuine validator signatures than required by the protocol to pass consensus validation.
CVE-2026-77423 is a Regular Expression Denial of Service (ReDoS) vulnerability in the built-in less viewer of the JLine Java library (versions 3.0.0 prior to 3.30.15, and 4.0.0 prior to 4.3.1). The org.jline.builtins.Less class passes user-supplied search and display-filter patterns directly to Java's standard backtracking regular expression engine without complexity validation or execution timeouts. An attacker with access to an interactive JLine session can submit patterns containing nested quantifiers, causing catastrophic backtracking that consumes 100% of a CPU core and blocks the session thread indefinitely. In network-facing deployments such as SSH or Telnet administration consoles, repeated exploitation across concurrent sessions can exhaust bounded worker thread pools and result in a complete denial of service.