# Missing ownership check on remote wipe endpoint

Missing ownership check on Nextcloud's remote-wipe endpoint let any authenticated user wipe another user's device by swapping the auth-token ID.

- Payout: $500
- Severity: high
- Program: Nextcloud
- Found by: hitman_47
- Disclosed: 2020-04-19
- CVE: CVE-2020-8154
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/819807
- Library page: https://bugbountylibrary.com/r/h1%3A819807
- Tags: area:web domain:web impact:dos impact:integrity kind:bounty platform:hackerone sev:high tech:php vuln:access-control vuln:idor

**Target:** Nextcloud server settings/personal/authtokens/wipe/{id} endpoint
**Root cause:** The wipe endpoint looked up the auth token/device by the supplied ID without verifying it belonged to the requesting user, an IDOR on the token ID.
**Steps:**
1. Create two accounts (attacker, victim), each adding a device with a distinct name.
2. As attacker, intercept the wipe request in Burp: `settings/personal/authtokens/wipe/{data-id}`.
3. Replace `{data-id}` with the victim's device/token ID.
4. Forward the request; victim's device is marked for remote wipe.
**How found:** Researcher noticed the wipe URL contained a raw device/token ID and tested swapping it to another account's ID while intercepting.
**Exploitation:** Any authenticated user enumerates/guesses a victim's auth-token ID and issues the wipe request with that ID; the server marks the victim's device for wipe without ownership validation.
**Insight:** Device-management endpoints keyed by token/device IDs are prime IDOR targets; test wipe/revoke/rename actions across accounts since destructive actions often skip ownership checks.

## Proof of concept (copied exactly from the original report)

**Wipe request with victim's device ID**

```
settings/personal/authtokens/wipe/{data-id}, change the data-id to the id of the device of the victim
```

