This vulnerability occurs when an application fails to properly verify whether a user has permission to access specific data or perform certain actions before allowing the request.
Authorization is the security gatekeeper that decides what an authenticated user is allowed to do. It checks a user's privileges against defined permissions before granting access to resources like files, database records, or administrative functions. When this check is missing, inconsistent, or flawed, the gate is left open. Failing to enforce proper authorization can have severe consequences. Attackers or regular users may exploit this weakness to view sensitive data they shouldn't see, modify or delete critical information, disrupt services for others, or even execute unauthorized commands. This makes improper authorization a root cause for data breaches, system compromise, and privilege escalation attacks.
Impact: Read Application DataRead Files or Directories
An attacker could read sensitive data, either by reading the data directly from a data store that is not properly restricted, or by accessing insufficiently-protected, privileged functionality to read the data.
Impact: Modify Application DataModify Files or Directories
An attacker could modify sensitive data, either by writing the data directly to a data store that is not properly restricted, or by accessing insufficiently-protected, privileged functionality to write the data.
Impact: Gain Privileges or Assume Identity
An attacker could gain privileges by modifying or reading critical data directly, or by accessing insufficiently-protected, privileged functionality.
Strategy: Libraries or Frameworks
php
//Use a prepared statement to avoid CWE-89* $preparedStatement = $globalDbHandle->prepare('SELECT * FROM employees WHERE name = :name'); $preparedStatement->execute(array(':name' => $name)); return $preparedStatement->fetchAll();}
phpperl
perl
High