Secure Legion Labs
IDOR Progression
This room moves beyond a single object ID. The portal asks for both a customer and an invoice reference, but it only validates that each object exists. It never checks whether the invoice actually belongs to the requesting customer.
The current customer session is CUST-1001. Try requesting invoices with different references and think about what should happen if the object relationships were enforced correctly.
?customer=CUST-1001&invoice=INV-2101Expose an ownership mismatchThe endpoint treats customer lookup and invoice lookup as separate checks. The missing link is the ownership relationship between those two records.
customer = customers[id]
invoice = invoices[ref]
if (customer && invoice) { return invoice }
// missing invoice.customerId === customer.idTry different customer and invoice combinations to observe what the application returns.
GET /api/invoice?customer=&invoice={ "status": "idle" }The portal renders the invoice whenever the objects exist. The bug is the missing relationship validation between the customer and the invoice.
Status: waiting for an invoice request.
The flag appears after the current customer can see the target invoice that belongs to another account.
Submit the unlocked flag to finish the medium room.
Flag is locked until you retrieve the target invoice.
The endpoint trusts both a customer ID and an invoice reference from the request.
It verifies existence but not the relationship between them.
An attacker can pair the victim invoice with their own customer context and still receive the data.