The product does not conform to the API requirements for a function call that requires extra privileges. This could allow attackers to gain privileges by causing the function to be called incorrectly.

When a product contains certain functions that perform operations requiring an elevated level of privilege, the caller of a privileged API must be careful to:

ensure that assumptions made by the APIs are valid, such as validity of arguments
account for known weaknesses in the design/implementation of the API
call the API from a safe context

If the caller of the API does not follow these requirements, then it may allow a malicious user or process to elevate their privilege, hijack the process, or steal sensitive data.
For instance, it is important to know if privileged APIs do not shed their privileges before returning to the caller or if the privileged function might make certain assumptions about the data, context or state information passed to it by the caller. It is important to always know when and how privileged APIs can be called in order to ensure that their elevated level of privilege cannot be exploited.

Primary

Architecture and Design

Implementation

Operation

Low

Access Control
Gain Privileges or Assume Identity
An attacker may be able to elevate privileges.

Confidentiality
Read Application Data
An attacker may be able to obtain sensitive information.

Integrity
Confidentiality
Availability
Execute Unauthorized Code or Commands
An attacker may be able to execute code.

Implementation
Before calling privileged APIs, always ensure that the assumptions made by the privileged code hold true prior to making the call.

Architecture and Design
Know architecture and implementation weaknesses of the privileged APIs and make sure to account for these weaknesses before calling the privileged APIs to ensure that they can be called safely.

Implementation
If privileged APIs make certain assumptions about data, context or state validity that are passed by the caller, the calling code must ensure that these assumptions have been validated prior to making the call.

Implementation
If privileged APIs do not shed their privilege prior to returning to the calling code, then calling code needs to shed these privileges immediately and safely right after the call to the privileged APIs. In particular, the calling code needs to ensure that a privileged thread of execution will never be returned to the user or made available to user-controlled processes.

Implementation
Only call privileged APIs from safe, consistent and expected state.

Implementation
Ensure that a failure or an error will not leave a system in a state where privileges are not properly shed and privilege escalation is possible (i.e. fail securely with regards to handling of privileges).

CVE-2003-0645
A Unix utility that displays online help files, if installed setuid, could allow a local attacker to gain privileges when a particular file-opening function is called.
https://www.cve.org/CVERecord?id=CVE-2003-0645

Allowed
This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.

Evgeny Lebanidze
Cigital
2008-01-30
Draft 8
2008-01-30

CWE Content Team
MITRE
2008-09-08
updated Common_Consequences, Relationships

CWE Content Team
MITRE
2008-10-14
updated Description, Potential_Mitigations

CWE Content Team
MITRE
2009-05-27
updated Name, Related_Attack_Patterns

CWE Content Team
MITRE
2009-10-29
updated Common_Consequences

CWE Content Team
MITRE
2010-04-05
updated Related_Attack_Patterns

CWE Content Team
MITRE
2010-12-13
updated Common_Consequences, Description

CWE Content Team
MITRE
2011-03-29
updated Description, Potential_Mitigations

CWE Content Team
MITRE
2011-06-01
updated Common_Consequences

CWE Content Team
MITRE
2012-05-11
updated Relationships

CWE Content Team
MITRE
2012-10-30
updated Potential_Mitigations

CWE Content Team
MITRE
2014-07-30
updated Relationships

CWE Content Team
MITRE
2017-11-08
updated Applicable_Platforms, Enabling_Factors_for_Exploitation, Observed_Examples, Relationships

CWE Content Team
MITRE
2018-03-27
updated Observed_Examples

CWE Content Team
MITRE
2023-01-31
updated Description

CWE Content Team
MITRE
2023-04-27
updated Relationships

CWE Content Team
MITRE
2023-06-29
updated Mapping_Notes, Relationships

CWE Content Team
MITRE
2025-12-11
4.19
2025-12-11
updated Weakness_Ordinalities

Improper Use of Privileged APIs