This vulnerability occurs when an application fails to verify whether a user has permission to access specific data or execute certain actions before allowing the request to proceed.

Missing authorization is a common security flaw where an application assumes a user's identity (authentication) is enough to grant access, skipping the crucial step of checking their specific privileges. Think of it like having a key to enter a building (authentication) but then being able to walk into any office or safe without further checks. This allows attackers, including other authenticated users, to access data or perform functions they shouldn't, such as viewing another user's private information, modifying account settings, or deleting critical resources. To prevent this, developers must implement a consistent and robust authorization layer that validates permissions for every request involving sensitive resources or actions. This involves defining clear roles and permissions, checking them against the requested operation and the target data (e.g., ensuring User A can only edit their own profile, not User B's), and centralizing these checks to avoid inconsistencies. Relying solely on UI element hiding is insufficient, as direct API calls or modified requests can easily bypass such superficial controls.
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 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 restricted, or by accessing insufficiently-protected, privileged functionality to write the data.
Impact: Gain Privileges or Assume IdentityBypass Protection Mechanism
An attacker could gain privileges by modifying or reading critical data directly, or by accessing privileged functionality.
Impact: DoS: Crash, Exit, or RestartDoS: Resource Consumption (CPU)DoS: Resource Consumption (Memory)DoS: Resource Consumption (Other)
An attacker could gain unauthorized access to resources on the system and excessively consume those resources, leading to a denial of service.
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