Skip to content
IDOR Disclosed report Beginner CVE-2020-8154

Missing ownership check on remote wipe endpoint

The remote wipe endpoint did not verify that the device belonged to the requesting user. An attacker could mark another user's device for wiping by substituting its identifier in the request.

hitman_47 Follow

Originally disclosed on HackerOne

Bounty$500 High 7.7 View original
  • Triaged in 10 hours
  • Fixed in 4 days
  • Paid in 4 days
  • Disclosed after 35 days

On settings/user/security

You can mark a device for wipe out that does not belong to you.

Steps:

  1. Create 2 accounts one for the hacker and one for the victim
  2. On both accounts add devices with different names
  3. On the hacker account, while intercepting with burpsuite, select the option to wipe out a device
  4. Forward with burpsuite and in the url that looks like settings/personal/authtokens/wipe/{data-id}, change the data-id to the id of the device of the victim
  5. Stop intercepting or forward again and the device of the victim will be marked for wipe out.

Here is a video demo

IDORNextCloud.mp4 From the original on HackerOne

Impact

Attacker can wipe out the device of another user by using the device ID

The original report as published on HackerOne, by hitman_47. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 5 min read.

What the report shows

The target is the device management feature of Nextcloud, reached at settings/user/security. From that page a user can mark one of their own devices for a remote wipe. The researcher found that the wipe action does not check that the device being wiped belongs to the account making the request, so any authenticated user can mark another user's device for wipe out.

The researcher reproduced it with two accounts, one acting as the attacker and one as the victim:

  1. Create two accounts, one for the hacker and one for the victim.
  2. On both accounts, add devices with different names.
  3. On the hacker account, with Burp Suite intercepting, select the option to wipe out a device.
  4. Forward the request in Burp Suite and, in the URL that looks like settings/personal/authtokens/wipe/{data-id}, change the data-id to the ID of the victim's device.
  5. Stop intercepting or forward again, and the victim's device is marked for wipe out.

The request the researcher tampers with has this shape:

HTTP
settings/personal/authtokens/wipe/{data-id}
IDORNextCloud.mp4 From the original on HackerOne

The report includes a video demonstration of the steps.

The report records the impact as the ability to wipe another user's device by using its device ID. It is filed as an insecure direct object reference, rated high with a CVSS score of 7.7, and the researcher received a bounty of 500.00 USD. The report does not describe the fix.

Root cause

The wipe endpoint takes the device identifier from the URL and acts on it. The likely mistake is that the server looks up the device by that identifier and performs the wipe without confirming that the device is owned by the authenticated user making the request. The session is valid and the request is well formed, so authentication passes; what is missing is the authorisation check that ties the object to the caller. Because the identifier is taken from the URL rather than bound to the session, changing it is enough to reach another user's device.

Impact

An authenticated attacker can mark any other user's device for wipe out, provided they know or can guess its device ID. The report records the impact as the ability to wipe out another user's device by using its device ID. The report frames the impact in exactly these terms: the attacker can wipe out the device of another user by using the device ID. It does not describe any further consequence, such as account takeover or access to the victim's data.

How this kind of bug works

Insecure direct object reference is an authorisation failure, not an authentication one. The application exposes an internal identifier in a URL, form field or JSON body, and the handler uses it to select a record. If the handler trusts the identifier and never checks that the record belongs to the current principal, then any user who can reach the endpoint can act on any record whose identifier they can supply.

The bug class is common wherever objects have sequential or otherwise guessable IDs and where the same endpoint serves many tenants or users. It is especially damaging on state-changing actions: delete, transfer, wipe, revoke, share and export. Read endpoints leak data; write endpoints let an attacker alter or destroy someone else's resources.

Defences are straightforward in principle. Every object access should be scoped to the authenticated principal, either by querying with an owner constraint (the record must match the current user) or by resolving the object through the user's own collection so that a foreign ID simply does not resolve. Where identifiers must be exposed, unguessable values reduce the ease of enumeration but do not replace the ownership check. Centralising authorisation in one place, rather than repeating it per handler, makes it harder to forget on a new endpoint.

How to test for it

  1. Map the endpoints that act on objects: anything with an ID in the path, query string or body, especially state-changing actions.
  2. Create two accounts, A and B, and give each some objects of the same kind, with distinct names so you can tell them apart.
  3. As A, perform the action on A's own object while intercepting the request.
  4. Note the identifier and the exact request shape.
  5. Replay the same request as A but with B's identifier substituted.
  6. Observe the response and, more importantly, the state: check B's account to see whether the action took effect.

A positive result is that the action succeeds against B's object while you are authenticated as A. A response code alone is not proof; confirm the effect on the victim's side. Common false positives include endpoints that return a generic success message but silently ignore the request, identifiers that are already scoped to the session (so substitution fails cleanly), and cases where the two accounts share the object legitimately through a group or share. Also check whether the identifier is validated against a signed or session-bound value before you conclude the check is missing.

How it is fixed

  • Enforce an ownership check on every object access: the record must belong to the authenticated user, or the user must hold an explicit permission on it.
  • Resolve objects through the caller's own collection so foreign identifiers do not resolve.
  • Apply the check on the server, not in the client, and apply it to state-changing actions as strictly as to reads.
  • Add regression tests that attempt cross-account access and expect a denial.
  • Consider unguessable identifiers as defence in depth, while keeping the ownership check as the primary control.

Hunting notes

This bug class tends to hide in features added later: device management, API tokens, sessions, notifications, exports, attachments and anything with a numeric or UUID identifier in the URL. Look for endpoints where the client sends an ID that the server could have derived from the session instead. Recon signals include identifiers that increment between your own objects, endpoints that accept an ID in more than one place, and actions whose UI only ever exposes your own records, which suggests the server may not expect a foreign one. To make a report land, demonstrate the effect on a second account you control, show the exact request and the substituted identifier, and state the concrete consequence, such as data loss or a forced reset. Programs accept these reports when the impact is clear and reproducible, so keep the proof minimal and unambiguous.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 7 min read.

What happened, in plain words

Nextcloud is a self-hosted service for storing files and managing your account, a bit like a private version of Google Drive. One of its features is device management: you can see the phones and computers connected to your account, and if you lose one, you can mark it for a remote wipe. A remote wipe is a command that tells the device to erase its local data, useful when a laptop or phone has been stolen.

The researcher found that this wipe action does not check who owns the device. Any logged-in user can mark another user's device for wipe out, as long as they know that device's ID. This kind of mistake is called an insecure direct object reference, or IDOR: the application takes an identifier from the request and acts on whatever record that identifier points to, without confirming that the record belongs to the person asking.

The page involved is reached at settings/user/security. The researcher reproduced the problem with two accounts, one playing the attacker and one playing the victim:

  1. Create two accounts, one for the hacker and one for the victim.
  2. On both accounts, add devices with different names.
  3. On the hacker account, with Burp Suite intercepting, select the option to wipe out a device.
  4. Forward the request in Burp Suite and, in the URL that looks like settings/personal/authtokens/wipe/{data-id}, change the data-id to the ID of the victim's device.
  5. Stop intercepting or forward again, and the victim's device is marked for wipe out.

Burp Suite is a tool that sits between your browser and the website and lets you pause, read and edit each request before it is sent. Step 3 matters because it is the only way to see the request and change it: the normal web page never offers you a box to type someone else's device ID. Step 4 is the heart of the bug. The URL has this shape:

HTTP
settings/personal/authtokens/wipe/{data-id}

Read it piece by piece. settings/personal/authtokens/wipe/ is the fixed part that tells the server which action to perform, here a wipe of a device's authentication token. {data-id} is the variable part that identifies which device to act on. When the hacker wipes their own device, that value is their own device's ID. By replacing it with the victim's ID, the hacker asks the server to wipe a device that is not theirs. The server accepts the request because the hacker is properly logged in; what it fails to do is check that the device named in the URL belongs to that logged-in user.

IDORNextCloud.mp4 From the original on HackerOne

The report includes a video demonstration of the steps.

The report records the impact as the ability to wipe another user's device by using its device ID. It is filed as an insecure direct object reference, rated high with a CVSS score of 7.7, and the researcher received a bounty of 500.00 USD. The report does not describe the fix.

In general, how this kind of bug works

An IDOR is an authorisation failure, not an authentication one. Authentication asks "who are you?" and is answered by logging in. Authorisation asks "are you allowed to do this?" and is a separate question. In this case the hacker is genuinely logged in, so authentication passes; the missing piece is the check that ties the device to the caller.

The pattern appears wherever an application puts an internal identifier in a URL, a form field or a JSON body and then uses it to pick a record. If the server trusts that identifier and never confirms ownership, any user who can reach the endpoint can act on any record whose identifier they can supply. It is like a hotel reception that hands out a key to any room number you say out loud, without checking that the room is booked in your name.

The bug is especially damaging on actions that change state: delete, transfer, wipe, revoke, share and export. Read endpoints leak data; write endpoints let an attacker alter or destroy someone else's resources.

Defences are straightforward in principle. Every object access should be scoped to the logged-in user, either by querying with an owner constraint (the record must match the current user) or by looking the object up through the user's own collection, so that a foreign ID simply does not resolve. Where identifiers must be exposed, unguessable values make enumeration harder but do not replace the ownership check. Centralising authorisation in one place, rather than repeating it in every handler, makes it harder to forget on a new endpoint.

In general, how to test for it

  1. Map the endpoints that act on objects: anything with an ID in the path, query string or body, especially state-changing actions.
  2. Create two accounts, A and B, and give each some objects of the same kind, with distinct names so you can tell them apart.
  3. As A, perform the action on A's own object while intercepting the request.
  4. Note the identifier and the exact request shape.
  5. Replay the same request as A but with B's identifier substituted.
  6. Observe the response and, more importantly, the state: check B's account to see whether the action took effect.

A positive result is that the action succeeds against B's object while you are logged in as A. A response code alone is not proof; confirm the effect on the victim's side. Common false positives include endpoints that return a generic success message but silently ignore the request, identifiers that are already tied to the session (so substitution fails cleanly), and cases where the two accounts share the object legitimately through a group or share. Also check whether the identifier is validated against a signed or session-bound value before you conclude the check is missing.

In general, how it is fixed

  • Enforce an ownership check on every object access: the record must belong to the logged-in user, or the user must hold an explicit permission on it.
  • Resolve objects through the caller's own collection so foreign identifiers do not resolve.
  • Apply the check on the server, not in the client, and apply it to state-changing actions as strictly as to reads.
  • Add regression tests that attempt cross-account access and expect a denial.
  • Consider unguessable identifiers as defence in depth, while keeping the ownership check as the primary control.

In general, where to look

This bug class tends to hide in features added later: device management, API tokens, sessions, notifications, exports, attachments and anything with a numeric or UUID identifier in the URL. Look for endpoints where the client sends an ID that the server could have derived from the session instead. Signals include identifiers that increment between your own objects, endpoints that accept an ID in more than one place, and actions whose interface only ever shows your own records, which suggests the server may not expect a foreign one. To make a report land, demonstrate the effect on a second account you control, show the exact request and the substituted identifier, and state the concrete consequence, such as data loss or a forced reset. Programs accept these reports when the impact is clear and reproducible, so keep the proof minimal and unambiguous.

Glossary

  • Nextcloud: a self-hosted service for file storage and account management.
  • Remote wipe: a command that tells a device to erase its local data.
  • Device ID: the identifier that names a particular connected device in the application.
  • Request: the message a browser sends to a server asking it to do something.
  • URL: the address of a page or action on a website.
  • Burp Suite: a tool that intercepts, displays and lets you edit requests between browser and server.
  • Intercepting: pausing a request in a proxy tool so you can read or change it before it is sent.
  • Authentication: proving who you are, usually by logging in.
  • Authorisation: deciding whether a logged-in user is allowed to perform an action.
  • IDOR (insecure direct object reference): a bug where an application acts on an identifier from the request without checking that the object belongs to the caller.
  • Endpoint: a specific action or address on a server that a request can target.
  • State-changing action: an action that alters data, such as delete, transfer, wipe or revoke.
  • Owner constraint: a rule that a record must belong to the current user for the query to return it.
  • Enumeration: trying many identifiers in turn to find ones that exist.
  • UUID: a long, hard-to-guess identifier.
  • Defence in depth: adding extra layers of protection beyond the main one.
  • Regression test: an automated test that checks a fixed bug stays fixed.
  • CVSS: a standard scoring system for the severity of a vulnerability.
  • Bounty: a payment a program gives a researcher for a valid report.

More by hitman_47

View all

5 more disclosed reports, best first.

More from Nextcloud

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.