Accessing Restricted Documents With Extra JSON Body Content
A normal user could create a new document that copied the contents of another user's document by adding that document's identifier to the JSON body of a create request. The attacker could read restricted documents belonging to other team members.
Published on imranhudaa.medium.com
The issue I’m going to share with you guys is few months old but recently I have found same issue on the program while I was re-checking my fixed issues. The program is private on Bugcrowd I’m not going to share such information that discloses the program.
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 create endpoint trusted a client-supplied document identifier and copied that document's data without checking whether the requester had access to it.
Impact
A normal user could read restricted documents, but the text says this was only exploitable between members of the same team.
What the attacker needed
Two accounts in the same team; one account holds a restricted document
How it was found
- Log in as an admin and create a document.
- Log in as a normal user and try to access the admin document; every endpoint returns 403.
- While editing the normal user's own document, notice the request body contains a documentId.
- Send a create-document request with the admin's documentId added to the JSON body.
- Observe that a new document is created containing the admin document's information.
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.
When you create a document, the app sends a request with some settings. The reporter added an extra field naming someone else's document, and the app copied that document's content into a new one the attacker owned. This let a normal user see a document they were not supposed to access.
What is IDOR?
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.