Day 18: I changed someone else’s address and the server didn�
An address update endpoint accepted a client-supplied addressID parameter without checking that the record belonged to the logged-in user. A normal user could change the identifier to another user's record and modify that person's saved address.
Target Application: https://github.com/Yavuzlar/VulnLab/tree/main
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
The server used a client-supplied identifier to select the record to update without verifying that the authenticated user owned that record.
Impact
An attacker could modify other users' personal information, corrupt stored data and trigger delivery or billing errors.
What the attacker needed
A normal user account; ability to intercept requests
The fix
The server should derive record ownership from the authenticated session and enforce an authorization check on every update rather than trusting the client-supplied identifier.
How it was found
- Intercept the address update request before it is sent to the server.
- Note the addressID parameter in the request body.
- Change the addressID value to one belonging to another user.
- Send the modified request as a normal user.
- Observe that the other user's address is updated.
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.
When you save your address on a website, the site needs to know which saved record to change. Here it trusted a number sent by your browser to pick the record. By changing that number, a user could edit a record that belonged to a different person, because the server never checked who owned it.
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.