How I found an IDOR on Achmea
An API endpoint that returned the current user's profile also accepted any numeric user ID, so changing the ID returned other users' personal data. An attacker could enumerate sequential IDs to disclose every user's email, full name, address and date of birth.
Published on medium.com
Assalamu Alaikum and greetings to everyone. This is my second write-up on how I exploited an IDOR to get cool swag from Achmea.
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 API looked up a user record by the ID supplied in the URL without checking that the ID belonged to the authenticated user.
Impact
Any logged-in user could read the personal details of every other user, including email, full name, address and date of birth.
What the attacker needed
A free account; ability to intercept HTTP requests
The fix
The endpoint should check that the requested user ID matches the authenticated user, or use only the session to identify the user.
How it was found
- Create an account and log in to the profile.
- Notice the API request that fetches the current user's profile.
- Replace the 'me' path segment with the account's own numeric ID and confirm the same response.
- Change the numeric ID to a neighbouring value and observe another user's data.
- Run sequential IDs through an intruder to retrieve every user's information.
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.
A website often uses a number to identify your account, like a locker number. Here the site checked that you were logged in but did not check that the locker you asked for was yours, so anyone could try neighbouring numbers and read other people's details. This is called an insecure direct object reference, or IDOR.
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.