Course contentsShow
← Security
Lesson 822 of 3,05217. Web Security - Authorization and Access ControlFree lesson

Understanding Privilege Escalation Concepts

Learn the fundamentals of horizontal and vertical privilege escalation and their impact on web applications.

Understanding Privilege Escalation Concepts

What you'll learn: You'll understand how attackers exploit weak authorization to gain access beyond their intended permissions through horizontal and vertical privilege escalation.

The Core Idea

Privilege escalation occurs when an attacker moves from their legitimate access level to one they shouldn't have. This happens when applications fail to properly verify that a user has permission for every action they attempt.

Think of it like a hotel: you have a key card for room 205. Horizontal privilege escalation would be finding a way to open room 206—someone else's room at the same level. Vertical privilege escalation would be gaining access to the manager's office or the penthouse—a higher level of authority entirely.

Horizontal Privilege Escalation

This occurs when users access resources belonging to other users at the same privilege level. For example:

  • Viewing another customer's order history
  • Reading someone else's private messages
  • Modifying another user's profile

The attacker remains at the "regular user" level but crosses boundaries between user accounts.

Vertical Privilege Escalation

This occurs when users gain access to higher-privilege functionality. For example:

  • A regular user accessing admin-only pages
  • A customer performing manager-level operations
  • A viewer account gaining editor permissions

The attacker elevates themselves from a lower role to a more powerful one.

Why It Matters

Both types exploit the same fundamental flaw: the application checks authentication (who you are) but not authorization (what you're allowed to do). As you learned in previous lessons about IDOR and broken access control, every request must verify permissions—not just initial login.

Key Takeaway: Privilege escalation splits into horizontal (accessing peer-level resources) and vertical (accessing higher-privilege functions), both stemming from insufficient authorization checks on every action a user attempts.