Vulnerability
Missing Authorization Checks
Vulnerability
The most direct authorization failure is simply not performing an authorization check at all. The endpoint verifies that the requester is authenticated, then immediately performs the requested action without asking whether that authenticated identity is actually permitted to do it.
For example:
DELETE /api/posts/551
→ Is there a valid session?
Yes ✓
→ Is this user allowed to delete post 551?
Never checked ✗
→ Delete postThe server has successfully established who the requester is, but never establishes what that requester is allowed to do.
A vulnerable implementation might look like:
$post = Post::findOrFail($request->id);
$post->delete();The fact that findOrFail() successfully found the post says nothing about whether the current user is authorized to delete it.
A secure implementation needs an explicit authorization decision:
Authenticated user
↓
Requested action: delete
↓
Requested object: post 551
↓
Does this user have permission?
↓
Allow / DenyDepending on the application's rules, that might mean checking ownership:
if ($post->user_id !== auth()->id()) {
abort(403);
}or checking a role:
if (!auth()->user()->can('delete', $post)) {
abort(403);
}This vulnerability can therefore produce both horizontal and vertical authorization failures:
Normal user
→ deletes another user's post
→ horizontal failure
Normal user
→ deletes an admin-owned/protected post
→ potentially vertical/object-level failureA valid session proves identity; it does not grant unrestricted access. Every protected operation needs an explicit authorization decision.