portswigger-all-labs

Complete PortSwigger Web Security Academy Lab Writeups Detailed, categorized solutions for every lab — from APPRENTICE to EXPERT — covering all 30 vulnerability types.

View on GitHub

Access Control

Lab Levels

Jump directly to the lab writeups:

Introduction

Access control is the enforcement of restrictions on what authenticated users are permitted to do. It builds on top of authentication (verifying identity) and session management (tracking the identity across requests).

Broken access control vulnerabilities are extremely common and often critical, allowing unauthorized users to perform actions or access data outside their intended permissions.


Types of Access Controls

1. Vertical Access Control

Vertical Access Control Example
Figure: Users with higher roles (like Admin) have more permissions than lower roles (like Regular User).


2. Horizontal Access Control

Horizontal Access Control Example
Figure: Users with the same role can only access their own data, not others’ data.


3. Context-Dependent Access Control

Context-Dependent Access Control Example
Figure: Access granted or denied depending on context, such as device or session state.


How to Prevent Access Control Vulnerabilities


Reference

Original source: PortSwigger – Access Control