IDOR in changing shared file name
A GraphQL mutation that renames a transcript did not check whether the caller owned the transcript, only that they supplied its identifier. A user who had a file shared with them could rename that file, which the product otherwise does not allow.
Originally disclosed on HackerOne
- Disclosed after 59 days
Summary:
Hi Trind LTD, I have found a IDOR vulnerability in https://app.trint.com . An user can change shared file names through this IDOR.
Steps To Reproduce:
- Create a file from account B
- Capture the request of renaming the file as shown in sample request
- Create a file [from account A] and share it with another user [account B]
- Change the transcriptId to shared file's transcriptid
- Boom! The name of shared file is changed
Sample Request:
POST / HTTP/1.1
Host: graphql2.trint.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://app.trint.com/trints
content-type: application/json
Authorization: Bearer token..
X-Trint-Request-Id: 34ba5627-d874-4be1-8f9b-5b1415c2f0a5
X-Trint-Super-Properties: {"distinct_id":"5cc05c8f03c35799283fe3b7","$device_id":"16a4f88b2e22dc-07342bd7a0305c8-4c312c7c-144000-16a4f88b2e3be9","$initial_referrer":"$direct","$initial_referring_domain":"$direct","returningUser":true,"$user_id":"5cc05c8f03c35799283fe3b7"}
Origin: https://app.trint.com
Content-Length: 536
Connection: close
{"operationName":"updateTranscriptMeta","variables":{"userId":"5cc05c8f03c35799283fe3b7","transcriptId":"dM3YxaINQGyWceq5rUzVog","transcriptName":"W00"},"query":"mutation updateTranscriptMeta($userId: String!, $transcriptName: String!, $transcriptId: String!) {\n updateTranscriptMeta(userId: $userId, transcriptMeta: {trintTitle: $transcriptName}, transcriptId: $transcriptId) {\n ...RenameTrintFragment\n __typename\n }\n}\n\nfragment RenameTrintFragment on TrintMetadata {\n _id\n trintTitle\n updated\n __typename\n}\n"}
Impact
Unauthorized users could change the file name. It is not allowed to rename the file for shared users but it is bypassed here through IDOR.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the rename mutation trusted the transcript identifier from the request and never verified that the caller owned that transcript.
Impact
A user with whom a file was shared could rename that file, which the product does not permit.
What the attacker needed
Two accounts; a file shared between them; a captured rename request
How it was found
- Create a file from one account and capture the request that renames it.
- Create a file from a second account and share it with the first account.
- Replace the transcript identifier in the captured rename request with the shared file's identifier.
- Send the request; the shared file is renamed.
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 report has not been written yet. The Original tab links to the source.
Every file has a hidden identifier. The server accepted a rename request for any identifier the sender provided, without checking that the sender owned that file. So someone who only had a file shared with them could still rename it.
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.