๐Ÿงช OWASP Top 10 Lab โ€” Broken Access Control (IDOR)

Category: A01: Broken Access Control

๐Ÿง  Vulnerability Type

Insecure Direct Object Reference (IDOR)

๐ŸŽฏ Objective

Demonstrate how improper authorization allows access to another user's data by modifying object identifiers in API requests.

๐Ÿ›  Lab Environment

๐Ÿ‘ฃ Steps to Reproduce

  1. Create two accounts:
  2. Add different products to each accountโ€™s cart.
  3. Intercept request:
GET /rest/basket/1
  1. Modify basket ID:
GET /rest/basket/2
  1. Observe response containing another user's cart data.

๐Ÿ’ฅ Impact

๐Ÿงช Proof of Concept

Modifying API object identifiers allowed horizontal access to another user's basket data without authorization checks.

Attacker Cart

Attacker Cart

Victim Cart

Victim Cart

Original Request (Attacker Cart)

Original Response

Modified ID Exploit โ€” Leaked Victim Cart

Modified Response

๐Ÿ›ก Mitigation

๐Ÿง  Key Learning

Access control must always be enforced on the server. Never trust client-supplied identifiers.

๐Ÿบ Personal Note

This lab demonstrates how simple identifier manipulation can lead to serious authorization failures commonly found in real-world bug bounty targets.