DriveShare booking IDOR
A peer-to-peer car rental app. Find a way to read another user's booking.
3 solves
An object reference, such as an id, a filename or a token, that the server trusts without checking who actually owns it.
An Insecure Direct Object Reference happens when an application exposes an internal identifier, such as a numeric id, a filename or a UUID, and lets a request act on it without checking that the current user actually owns or may access the thing that id points to.
// booking.php?id=182 $booking = $db->query("SELECT * FROM bookings WHERE id = ?", [$_GET['id']]); render($booking);
Nothing here asks "does this booking belong to the signed-in user?" Any authenticated account can walk the id space and read (or, worse, modify) records that belong to someone else.
IDOR is one of the most commonly reported bug classes in bug bounty programs precisely because it needs no special tooling: increment a number and watch what comes back. Impact ranges from reading another user's private data to full account takeover when the referenced object is a password-reset token or a session identifier.
$booking = $db->query( "SELECT * FROM bookings WHERE id = ? AND user_id = ?", [$_GET['id'], $currentUser->id] ); if (!$booking) { http_response_code(404); exit; }
Every object lookup must be scoped to the requester, not just the requested id: an ownership check, not just an existence check.
A peer-to-peer car rental app. Find a way to read another user's booking.
3 solves
A hospital patient portal. An attachment download trusts a client-supplied patient id.
2 solves
A robo-advisor dashboard. A "signed" statement token isn't actually signed with any secret.
2 solves