A web application responds with 200 OK when you change a number in a URL. Is that a vulnerability? You cannot answer from the status code alone. You need to know which identity made the request, what that identity was allowed to access, and what the response actually contained.
This article works through a small authorization exercise with two accounts and two documents. It shows how to establish a baseline, change one variable, record the result and write a finding that another person can reproduce. The same discipline helps when an apparent finding turns out to be a login page, an expired session or a misunderstood requirement.
Write the access rule before testing it
Our sample application has two ordinary users, Alex and Blair. Each owns a private document. The exercise requirement says that an ordinary user may read only their own document. There is no sharing feature or administrator exception in this specific scenario.
| Signed-in identity | Document | Expected access |
|---|---|---|
| Alex | 4101, owned by Alex | Allow |
| Alex | 4102, owned by Blair | Deny |
| Blair | 4102, owned by Blair | Allow |
| Unauthenticated visitor | Either private document | Deny |
This matrix is the test's reference point. Without it, you might report intended sharing as unauthorized access or miss a boundary that the application was supposed to enforce. In a real assessment, confirm the intended rule with the owner and the agreed scope rather than inventing it.
Establish a baseline you can trust
Sign in as Alex in the lab and open Alex's document through the normal interface. Capture the method, path, relevant headers and response. Keep the session credential private. A redacted record is appropriate for a report; an actual replay requires the authorized lab session, not the placeholder below.
GET /api/documents/4101 HTTP/1.1
Host: lab.example.test
Cookie: session=[REDACTED]
Accept: application/json
{
"id": 4101,
"owner": "alex",
"title": "Alex training note",
"body": "Sample content created for this exercise."
}
Record that the baseline returns the expected document for Alex. Confirm the active account through the application, not just a browser tab label. Mixing cookies from two accounts can create a false finding: you think Alex read Blair's document when the request actually carried Blair's session.
In a browser-based lab, separate profiles or isolated sessions can help keep identities clear. Record which session belongs to which test account. Avoid copying authentication material into public notes, screenshots or a shared URL.
Change one variable and inspect the whole result
Keeping Alex's authorized lab session, change only the document identifier from 4101 to the known test document 4102. Do not enumerate unrelated identifiers or expand beyond the exercise's supplied records. We are testing one defined relationship between a user and a resource.
GET /api/documents/4102 HTTP/1.1
Host: lab.example.test
Cookie: session=[ALEX SESSION REDACTED]
Accept: application/json
Compare the response with the baseline. A status code is useful context, but the response body and identity determine what the result supports. MDN's 200 reference describes a successful HTTP response; it does not establish that an application's authorization rule was correct.
| Observed result | What it supports | Next check |
|---|---|---|
| 403 and an error body | This request was refused. | Confirm the baseline still works and the refusal is for the intended identity. |
| 404 and no private content | The response does not disclose the target document. | Do not infer that the document does not exist; the application may conceal it. |
| 200 with an HTML login page | The returned page is not the private document. | Check session expiry and redirects. |
| 200 with Blair's private document body | The defined read boundary appears to fail for this test. | Confirm Alex's identity, Blair's ownership and repeatability. |
A 403 response indicates refusal, but a single denied request is not proof that every resource or action is protected. The conclusion should remain as narrow as the test.
Verify a suspected finding before reporting it
Suppose Alex receives Blair's document body. Repeat the original allowed request, then repeat the cross-account request without changing identities. Verify that document 4102 is private and owned by Blair under the scenario's rule. Check that the content is not a public preview or a shared template.
Use only the minimum evidence needed to establish the result. In this exercise, the controlled test document's identifier, owner and harmless sample text are enough. Accessing additional users' records would add exposure without answering the defined question.
If the response changes between attempts, capture the difference rather than selecting only the result that supports your first impression. Session expiry, a changed fixture or a caching issue may explain it. A non-reproducible observation can still be documented, but its uncertainty belongs in the finding.
Write the report around the broken rule
“IDOR found” is a label, not a complete explanation. A useful report states the violated access rule, the controlled steps, the observed result and the practical consequence supported by the evidence.
Title
Alex can read Blair's private training document in the lab API.
Preconditions
Two ordinary test accounts. Document 4101 belongs to Alex;
4102 belongs to Blair. The exercise prohibits cross-account reads.
Steps
1. Sign in as Alex and request /api/documents/4101. Confirm Alex's document.
2. Keep the same session and request /api/documents/4102.
3. Observe Blair's document identifier, owner and private sample body.
Expected
Alex is denied access to document 4102 and receives no private body.
Observed
The sample failing response returns Blair's document to Alex.
Impact and limits
Unauthorized read of the tested document in this lab configuration.
Write access, other endpoints and other roles were not tested.
This is a hypothetical failing result for teaching report structure. It is not a claim about Codelivly or another deployed application. If your actual lab denies the request, report that observed outcome instead of copying the example's conclusion.
Describe a fix and a useful retest
For this scenario, the application needs to check the requesting identity's permission for the requested document on the server. An interface that hides a link is not the same as enforcing that check. An identifier that is difficult to guess also does not define who is allowed to read the resource.
A retest should cover the allowed and denied rows in the matrix. Alex must still read Alex's document; Alex must not receive Blair's private content. Repeat the corresponding checks as Blair and without an authenticated session. Record the responses and any limits of the retest. This verifies the stated sample requirement, not the entire application's security.
Continue with Web Fundamentals if you need more practice reading HTTP, then use the authorized exercises in Web Application Security. For broader testing methodology, consult the OWASP Web Security Testing Guide and the specific instructions governing your lab.
Related Articles
12 Best ReactJS Projects for Beginners (With Security Projects)
Build React skills through 12 practical projects, from task trackers to security dashboards, with clear features, comple
ViewHow to Become a SOC Analyst Without a Degree (2026 Guide)
You don't need a cybersecurity degree to land your first SOC Analyst job — you need log literacy, hands-on SIEM reps, an
ViewMastering Exploit Development: The Key Skill for Professional Cybersecurity Practitioners
Have you read about hackers breaking into gateway systems and stealing proprietary information, or even shutting down en
ViewHow To Dox Someone: A Noob Friendly Guide
We are living in the era of Cyber Security Threats, where the Internet is available at our fingertips, we even don’t car
ViewHow To play Games in Termux ?
Learn how to run and play games inside Termux: emulator setup, installation steps, game controllers tips to make gaming
ViewNmap Cheatsheet 2026: Complete Command Guide for Hackers & Sysadmins
Nmap is a powerful and versatile network scanning tool used by network administrators, security professionals, and ethic
View