How a Simple Update Profile Picture Endpoint Led to an IDOR Vulnerability But
The profile picture endpoint used a user's internal application name in the URL path, and the server did not check that the requester owned that name, so any authenticated user could read another user's profile picture. The internal name could be obtained from the forgot-password flow by entering the victim's email address.
Published on medium.com
Hi everyone, I am dude and hope you are doing well and finding great bugs. This story is about an IDOR bug which I got on Private Program turned Public after just few days after.
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 picture endpoint authorised requests by authentication only and did not verify that the internal user name in the path belonged to the requesting account.
Impact
An authenticated attacker could view other users' profile pictures, but the program considered this to have no significant impact.
What the attacker needed
An account on the target; victim's email address; access to the forgot-password flow
How it was found
- Upload a profile picture and note the internal user name in the response path.
- Request the picture path directly and confirm it returns the image.
- Create a second account and use the forgot-password flow with the victim's email to obtain their internal name.
- Request the victim's picture path with the second account and receive a 200 OK with the victim's image.
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.
An IDOR (Insecure Direct Object Reference) happens when a website lets you change an identifier in a request, such as a name or number, and then shows you someone else's data without checking that it belongs to you. Here the identifier was a hidden internal username, and the site returned another person's profile picture when it was placed in the URL. The hidden username could be found by using the forgot-password page with the victim's email address.
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.