Payment bypass: booking trusts client-supplied offering_id (no slot match) #31
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: High — remotely exploitable by any logged-in student, direct financial impact.
Problem
BookingEndpoint::book()(src/Booking/BookingEndpoint.php:99-161) takesoffering_idstraight from the request and never verifies it matches the slot's own offering (or even the slot's instructor):Impact
offering_idof any free offering (or one withprice = 0). NoPaymentrow is created, yet the lesson/series is reserved andmarkBooked()runs → free lessons.etransfer_emailare sourced from an unrelated offering whileinstructor_idcomes from the slot → payment misrouting.Fix
Require the chosen offering to belong to
$slot->instructorIdand/or to be the slot's ownofferingId; reject mismatches with a 400/403.