Four different ways access control can fail. Each tab below isolates one CWE so you can focus on it. All four share the same root cause: the server trusts a user-supplied value to decide what data to return.
"IDOR" — Insecure Direct Object Reference. The server returns an order by id but never checks whether the id belongs to the caller.
oid = int(request.args['id']) return jsonify(ORDERS[oid]) # no ownership check
Submit 1 — you are alice, this is fine.
Submit 2 or 3. The server returns bob's or admin's
order, credit card and all.