Authorization disclaimer. This walkthrough is exclusively for the intentionally vulnerable PortSwigger Web Security Academy lab linked below. Only test systems you own or are explicitly authorized to assess.
Overview
The account page accepts a username in ?id= and returns that user’s record without checking whether it belongs to the authenticated session. This is a classic IDOR/BOLA condition.

Lab objective/setup
Log in as wiener:peter, retrieve the synthetic API key belonging to carlos, and submit it through the lab interface.
What I observed
The authenticated account page displayed an API key and used /my-account?id=wiener. The visible identifier suggested that changing the parameter could select a different account. The explored email update path was not the relevant weakness; the read endpoint was.



Why it is vulnerable
Authentication establishes who made the request, but the application never enforces that identity against the requested object. The user-controlled key is accepted as sufficient authority to read the record.
Walkthrough in the authorized PortSwigger lab
- Authenticate as
wienerand open the account page. - Replace
id=wienerwithid=carlos. - Observe Carlos’s synthetic API key and submit it using the lab control.


Verification
The response changes records solely because the query parameter changes. No session or privilege change occurs, confirming a missing object-level authorization check.
Impact and defensive lesson
IDOR can expose API keys, personal data, documents, or account actions at scale. Resolve identity from trusted session state and authorize access to every requested object.