Previous attachments can be referenced when creating a new report
A user could reference an attachment from a previous report when creating a new report by manipulating the attachment ID in the draft autosave request. This allowed the attachment to appear in the new report's comment, and the original attachment was deleted from the previous report.
- Triaged in 25 hours
- Fixed in 2 months
- Paid in 2 months
- Disclosed after 3.0 years
Hello When user upload file in comment to report, user can find file ID by two ways:
- In preview mode - In response to POST method
https://hackerone.com/attachments, answer will be something like this:
-{"id":84577,"name":"mytestfile.png","size":32397} where file_ID = 84577 (for example)
2. If user post comment - At link to hackerone-attachments.s3.amazonaws.com, where file_ID is part of the link
.../production/000/084/579/2b912875c3e8856c300dad535b732500f3c42c25/... In this case file_ID = 84579
When user post new report to some company on page: https://hackerone.com/[some_company]/reports/new in this page user's draft autosave by POST request: https://hackerone.com/security/reports/draft_sync
So if user post comment to report_1 and get file_ID_1, then he go to post new report to another company
and generate autosave POST request by himself and change file_ID_new_report to file_ID_1
For example:
report%5Btitle%5D=&report%5Bvulnerability_information%5D=Ffile_ID_1&report%5Battachment_ids%5D%5B%5D= file_ID_1&report%5Bforce%5D=false
And, as you can see, set in param vulnerability_information Ffile_ID_1 (for example F84577)
Then user reload page with new report (F5), there two issues:
- After Markdown parse he have direct link to file in comment (in our case file_ID_1 ): where comment to another report and another company.
I think it's not so critical, but same experiment with file, which uploaded directly in initial report_1, is fail. 2. More Strange - file_1 in comment to report_1 is deleted! No more link to file in this comment.
My same experiment with file uploaded by another user (I make test account : @dkusliy_test) also is fail. Luckily))
Thanks and Best!
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 application did not verify that the attachment ID belonged to the current user or report when processing the draft autosave request, allowing an attacker to reference arbitrary attachment IDs.
Impact
An attacker could reference an attachment from a previous report in a new report; the text also reports the original attachment being deleted.
What the attacker needed
A user account; ability to upload attachments; ability to create reports
How it was found
- Upload a file in a comment to a report and obtain its file ID from the response or the link.
- Go to the new report page for another company and trigger the draft autosave request.
- Modify the autosave request to set the attachment ID to the previously obtained file ID.
- Reload the new report page to see the file referenced and the original file deleted.
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.
When you upload a file to a report, the system gives it a unique number. The researcher found that by changing that number in a request that saves a draft report, they could make a new report point to an old file. This let them show a file from one report in a different report, and the old file was then removed from its original place.
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.