How I hacked a marriage database: tale of IDOR
An admin subdomain lacked authentication and returned personal data when an email was submitted, and a profile-hiding feature accepted a user ID from the client, letting an attacker hide another user's profile and receive their personal details in the response.
Published on medium.com
This was a site focused on marriage and was not in the traditional dating scene. Moreover, it was fairly new with a great reputation and high customer loyalty.
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 server trusted a client-supplied user ID for the hide-profile action instead of deriving the user from the authentication token, and the admin subdomain was left without authentication.
Impact
An attacker could hide other users' profiles and obtain their personal data, and the admin panel disclosed personal data without authentication; chaining both could allow downloading the whole user database, though the author notes that brute-forcing user IDs would not be practical.
What the attacker needed
No authentication on admin subdomain; valid account for hide-profile feature; ability to intercept and modify requests
The fix
The admin panel issue was fixed the same day, but the text does not state how the IDOR was fixed; it should be fixed by deriving the user identity from the authentication token rather than accepting a user ID from the client.
How it was found
- Enumerate subdomains and filter for live hosts.
- Open the admin subdomain and find no authentication is required.
- Submit an email address and observe personal data in the response.
- In the profile settings, use the hide-profile feature and capture the request.
- Replace the user ID in the request body with another user's ID.
- Observe that the other user's profile is hidden and their personal data is returned.
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 trusts an identifier sent by the user, such as a user ID, instead of checking who is logged in. Here, the hide-profile request included the user ID in the body, so changing it affected another person's account and leaked their private information. Separately, an admin page had no login at all and revealed personal data just from entering an 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.