Skip to content
IDOR Disclosed report Beginner

IDOR leading to downloading of any attachment

An Android app endpoint for downloading attachments used a simple numeric ID and did not properly check the Authorization header, allowing an attacker to access any user's attachments by guessing or brute-forcing the ID. The attacker could download attachments uploaded by any user.

naaash Follow

Originally disclosed on HackerOne

  • Triaged in 14 days
  • Fixed in 7 months
  • Paid in 13 days
  • Disclosed after 8 months

Description:

Hey team, I came across an endpoint on your android app which could be used to download any attachment which is being uploaded onto your server. All the attacker needs to do is bruteforce the simple ID which surprisingly is a randomly generated number( I personally think it's based on the time and it later gets converted using a epoch converter). What makes it worse it that, that particular endpoint doesn't even check for proper implementation of Authorization Header.

Steps to reproduce:

  • On the attacker's device, intercept all the requests using Burpsuite.
  • Send an attachment from the victim's account to the attacker's account.
  • In the Burpsuite's log you'll come across a request something similar to this:

GET /attachments/938540538 HTTP/1.1
X-Signal-Agent: OWA
Accept-Encoding: gzip, deflate
X-Client-Version: BCM Android/5.1 Model/generic_Google_Nexus_6 Version/1.26.0 Build/1393 Area/200 Lang/en
Host: ameim.bs2dl.yy.com
Connection: close
User-Agent: okhttp/3.12.0

  • Over here the ID number 938540538 will be different for each attachment.
  • Put this particular request the repeater tab and change the ID value to 359912920 (which was sent to some other person).
  • This is what it should look like:
    1.PNG
    1.PNG From the original on HackerOne
  • You can even try it out by removing the Authorization Header completely and still the attacker will end up getting the attachment.

PoC:

  • Have a look at the video over here:
    PoC_attachment.mp4 From the original on HackerOne

Impact

Getting access to all the attachments uploaded by any user.

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

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 endpoint used a predictable numeric identifier for attachments and failed to enforce proper authorization checks, allowing access to any attachment by ID.

Impact

An attacker could download any attachment uploaded by any user.

What the attacker needed

Android app installed; Ability to intercept traffic; Victim sends an attachment

How it was found

  1. Intercept requests using Burpsuite.
  2. Send an attachment from the victim's account to the attacker's account.
  3. Find the request to download the attachment in Burpsuite's log.
  4. Change the ID value in the request to another user's attachment ID.
  5. Send the modified request and receive the other user's attachment.
  6. Remove the Authorization header and still receive the attachment.

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 download a file from an app, the app usually checks that you are allowed to see it. Here, the app used a simple number to identify each file and did not properly check who was asking, so anyone could change the number and download someone else's file.

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.

More by naaash

View all

2 more disclosed reports, best first.

More from BCM Messenger

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.