How I Escalated Privileges in a File-Sharing Platform by Changing
A file-sharing platform's API allowed any authenticated shared user to approve access requests on behalf of the file owner by changing a client-controlled parameter from 'request' to 'approve'. This let a low-privileged viewer grant file access to another user without the owner's involvement or notification.
Published on medium.com
While testing a file-sharing platform API, I discovered that any authenticated shared user can approve file access requests on behalf of the file owner — by simply changing "request" to "approve" in a single API parameter.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server checked only that the caller had some access to the file, not that they were the owner, and trusted a client-supplied parameter to decide whether the action was a request or an approval.
Impact
A low-privileged shared viewer could silently grant file access to another user, bypassing the owner-only approval control; the owner was never asked or notified.
What the attacker needed
A free account; a shared file link; a legitimate shared user account
How it was found
- Log in as a user with no access to the file and open the share link.
- Click the 'Request Access' button and intercept the outgoing request.
- Note the client-controlled parameter that describes the action's intent.
- Switch to a legitimate shared user who is not the owner and capture their token.
- Send the same request with the shared user's token and the parameter changed to 'approve'.
- Observe a 200 OK response and the target user being granted access without the owner's involvement.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A file-sharing service lets the owner decide who can see a file. Other people with access are supposed to only ask for permission, not grant it. The API trusted a value sent by the browser that said whether the action was a request or an approval, so a normal user could pretend to be the owner and approve someone else's access.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.