CWE-266 特权授予不正确

Incorrect Privilege Assignment

结构: Simple

Abstraction: Base

状态: Draft

被利用可能性: unkown


A product incorrectly assigns a privilege to a particular actor, creating an unintended sphere of control for that actor.


  • cwe_Nature: ChildOf cwe_CWE_ID: 269 cwe_View_ID: 1000 cwe_Ordinal: Primary

  • cwe_Nature: CanAlsoBe cwe_CWE_ID: 286 cwe_View_ID: 1000


Language: {'cwe_Class': 'Language-Independent', 'cwe_Prevalence': 'Undetermined'}


范围 影响 注释
Access Control Gain Privileges or Assume Identity A user can access restricted functionality and/or sensitive information that may include administrative functionality and user accounts.


MIT-1 ['Architecture and Design', 'Operation']


Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.

MIT-17 ['Architecture and Design', 'Operation']

策略: Environment Hardening

Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.


Evidence of privilege change:

bad C

/ do some stuff /


bad Java

AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {

// privileged code goes here, for example:
return null;
// nothing to return

This application sends a special intent with a flag that allows the receiving application to read a data file for backup purposes.

bad Java

Intent intent = new Intent();

attack Java

public class CallReceiver extends BroadcastReceiver {
public void onReceive(Context context, Intent intent) {
Uri userData = intent.getData();

Any malicious application can register to receive this intent. Because of the FLAG_GRANT_READ_URI_PERMISSION included with the intent, the malicious receiver code can read the user's data.


标识 说明 链接
CVE-1999-1193 untrusted user placed in unix "wheel" group
CVE-2005-2741 Product allows users to grant themselves certain rights that can be used to escalate privileges.
CVE-2005-2496 Product uses group ID of a user instead of the group, causing it to run with different privileges. This is resultant from some other unknown issue.
CVE-2004-0274 Product mistakenly assigns a particular status to an entity, leading to increased privileges.


映射的分类名 ImNode ID Fit Mapped Node Name
PLOVER Incorrect Privilege Assignment
The CERT Oracle Secure Coding Standard for Java (2011) SEC00-J Do not allow privileged blocks to leak sensitive information across a trust boundary
The CERT Oracle Secure Coding Standard for Java (2011) SEC01-J Do not allow tainted variables in privileged blocks