|
|
|
|
CWE-266: Incorrect Privilege Assignment
| | Incorrect Privilege Assignment |
|
| Weakness ID: 266 (Weakness Base) | | Status: Draft |
Description
Description Summary A product incorrectly assigns a privilege to a particular actor, creating an unintended sphere of control for that actor.
Time of Introduction
- Architecture and Design
- Implementation
Common Consequences | Scope | Effect |
Access Control | Technical Impact: Gain privileges / assume
identity |
Demonstrative Examples Example 1 Evidence of privilege change: (Bad Code) Example
Language: C seteuid(0); /* do some stuff */ seteuid(getuid()); (Bad Code) Example
Language: Java AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
// privileged code goes here, for example:
System.loadLibrary("awt");
return null;
// nothing to return
}
Observed Examples | Reference | Description |
| 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. |
Potential Mitigations
Phases: Architecture and Design; Operation Very carefully manage the setting, management, and handling of
privileges. Explicitly manage trust zones in the software. |
Follow the principle of least privilege when assigning access rights
to entities in a software system. |
Weakness Ordinalities | Ordinality | Description |
Resultant | (where
the weakness is typically related to the presence of some other
weaknesses) |
Relationships Affected Resources Causal Nature Taxonomy Mappings | Mapped Taxonomy Name | Node ID | Fit | Mapped Node Name |
| PLOVER | | | Incorrect Privilege Assignment |
| CERT Java Secure Coding | SEC02-J | | Do not allow doPrivileged() blocks to leak sensitive
information outside a trust boundary |
| CERT Java Secure Coding | SEC03-J | | Do not allow tainted variables in doPrivileged
blocks |
Content History | Submissions |
|---|
| Submission Date | Submitter | Organization | Source |
|---|
| PLOVER | | Externally Mined | | | Modifications |
|---|
| Modification Date | Modifier | Organization | Source |
|---|
| 2008-07-01 | Eric Dalci | Cigital | External | | updated Time_of_Introduction | | 2008-09-08 | CWE Content Team | MITRE | Internal | | updated Description, Relationships, Taxonomy_Mappings,
Weakness_Ordinalities | | 2009-03-10 | CWE Content Team | MITRE | Internal | | updated Relationships | | 2009-12-28 | CWE Content Team | MITRE | Internal | | updated Potential_Mitigations | | 2010-06-21 | CWE Content Team | MITRE | Internal | | updated Potential_Mitigations | | 2011-06-01 | CWE Content Team | MITRE | Internal | | updated Common_Consequences, Relationships,
Taxonomy_Mappings |
|