CWE•Base•Draft•20 recent CVEs
CWE-250Execution with Unnecessary Privileges
Description
The product performs an operation at a privilege level that is higher than the minimum level required, which creates new weaknesses or amplifies the consequences of other weaknesses.
Common consequences
- Confidentiality,Integrity,Availability,Access Control→Gain Privileges or Assume Identity,Execute Unauthorized Code or Commands,Read Application Data,DoS: Crash, Exit, or RestAn attacker will be able to gain access to any resources that are allowed by the extra privileges. Common results include executing code, disabling services, and reading restricted data. New weaknesses can be exposed because running with ex
Potential mitigations
- Architecture and Design,OperationRun 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 ad
- Architecture and DesignIdentify the functionality that requires additional privileges, such as access to privileged operating system resources. Wrap and centralize this functionality if possible, and isolate the privileged code as much as possible from other code [REF-76]. Raise privileges as late as possible, and drop them as soon as possible to avoid CWE-271. Avoid weaknesses such as CWE-288 and CWE-420 by protecting
- Architecture and DesignIdentify the functionality that requires additional privileges, such as access to privileged operating system resources. Wrap and centralize this functionality if possible, and isolate the privileged code as much as possible from other code [REF-76]. Raise privileges as late as possible, and drop them as soon as possible to avoid CWE-271. Avoid weaknesses such as CWE-288 and CWE-420 by protecting
- ImplementationPerform extensive input validation for any privileged code that must be exposed to the user and reject anything that does not fit your strict requirements.
- ImplementationWhen dropping privileges, ensure that they have been dropped successfully to avoid CWE-273. As protection mechanisms in the environment get stronger, privilege-dropping calls may fail even if it seems like they would always succeed.
- ImplementationIf circumstances force you to run with extra privileges, then determine the minimum access level necessary. First identify the different permissions that the software and its users will need to perform their actions, such as file read and write permissions, network socket permissions, and so forth. Then explicitly allow those actions while denying all else [REF-76]. Perform extensive input validat
- Operation,System ConfigurationEnsure that the software runs properly under the United States Government Configuration Baseline (USGCB) [REF-199] or an equivalent hardening configuration guide, which many organizations use to limit the attack surface and potential risk of deployed software.
Related CWEs
Recent CVEs classified under this CWE
CVE-2026-111679.62026-06-04CVE-2026-108437.22026-06-04CVE-2025-126942026-06-04CVE-2026-420617.32026-06-03CVE-2026-444779.92026-05-28CVE-2026-36237.82026-05-27CVE-2026-83702026-05-19CVE-2026-292058.62026-05-13CVE-2026-326738.72026-05-13CVE-2026-326438.72026-05-13CVE-2026-257102026-05-13CVE-2026-428339.12026-05-12CVE-2026-406386.72026-05-12CVE-2026-419008.82026-05-08CVE-2026-420889.62026-05-04CVE-2026-405502026-04-28CVE-2026-259086.72026-04-27CVE-2026-220083.72026-04-21CVE-2026-337937.82026-04-09CVE-2026-44987.72026-04-08