Horizontal Privilege Escalation occurs when a user gains access to resources or functionality belonging to another user at the same privilege level. Unlike vertical escalation (gaining admin access), horizontal escalation involves accessing peer accounts.
The application performs some authorization but fails to verify that the specific resource belongs to the requesting user. A regular user can access another regular user's data by manipulating identifiers.
// User Alice views her profile
GET /profile?user_id=100 (Alice's ID)
// Alice changes ID to view Bob's profile
GET /profile?user_id=101 (Bob's ID)
// Application checks: "Is user logged in?" -- YES
// Application should check: "Does user 100 own resource 101?" -- NOT CHECKED
WHERE user_id = current_user.id