CWEweakness

CWE-250 Execution with Unnecessary Privileges

Medium Official page ↗
Alternate terms
Excessive Agency
Abstraction
Base
Structure
Simple
Status
Draft
Likelihood of exploit
Medium
Languages
Not Language-Specific, Python
CWE version
5.0

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 Restart — An 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 extra privileges, such as root or Administrator, can disable the normal security checks being performed by the operating system or surrounding environment. Other pre-existing weaknesses can turn into security vulnerabilities if they occur while operating at raised privileges.

Potential mitigations

• [Architecture and Design, Operation] 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. • [Architecture and Design] Identify 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 all possible communication channels that could interact with the privileged code, such as a secondary socket that is only intended to be accessed by administrators. • [Architecture and Design] Identify 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 all possible communication channels that could interact with the privileged code, such as a secondary socket that is only intended to be accessed by administrators. • [Implementation] Perform extensive input validation for any privileged code that must be exposed to the user and reject anything that does not fit your strict requirements. • [Implementation] When 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. • [Implementation] If 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 validation and canonicalization to minimize the chances of introducing a separate vulnerability. This mitigation is much more prone to error than dropping the privileges in the first place. • [Operation, System Configuration] Ensure 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.

Detection methods

• Manual Analysis: This weakness can be detected using tools and techniques that require manual (human) analysis, such as penetration testing, threat modeling, and interactive tools that allow the tester to record and modify an active session. • Black Box: Use monitoring tools that examine the software's process as it interacts with the operating system and the network. This technique is useful in cases when source code is unavailable, if the software was not developed by you, or if you want to verify that the build phase did not introduce any new weaknesses. Examples include debuggers that directly attach to the running process; system-call tracing utilities such as truss (Solaris) and strace (Linux); system activity monitors such as FileMon, RegMon, Process Monitor, and other Sysinternals utilities (Windows); and sniffers and protocol analyzers that monitor network traffic. Attach the monitor to the process and perform a login. Look for library functions and system calls that indicate when privileges are being raised or dropped. Look for accesses of resources that are restricted to normal users. • Automated Static Analysis - Binary or Bytecode: According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective: • Compare binary / bytecode to application permission manifest Cost effective for partial coverage: • Bytecode Weakness Analysis - including disassembler + source code weakness analysis • Binary Weakness Analysis - including disassembler + source code weakness analysis • Manual Static Analysis - Binary or Bytecode: According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: • Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies • Dynamic Analysis with Automated Results Interpretation: According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: • Host-based Vulnerability Scanners - Examine configuration for flaws, verifying that audit mechanisms work, ensure host configuration meets certain predefined criteria • Dynamic Analysis with Manual Results Interpretation: According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: • Host Application Interface Scanner • Manual Static Analysis - Source Code: According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective: • Manual Source Code Review (not inspections) Cost effective for partial coverage: • Focused Manual Spotcheck - Focused manual analysis of source • Automated Static Analysis - Source Code: According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: • Source code Weakness Analyzer • Context-configured Source Code Weakness Analyzer • Automated Static Analysis: According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: • Configuration Checker • Permission Manifest Analysis • Architecture or Design Review: According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective: • Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.) • Formal Methods / Correct-By-Construction Cost effective for partial coverage: • Attack Modeling

Observed examples

• CVE-2007-4217: FTP client program on a certain OS runs with setuid privileges and has a buffer overflow. Most clients do not need extra privileges, so an overflow is not a vulnerability for those clients. • CVE-2008-1877: Program runs with privileges and calls another program with the same privileges, which allows read of arbitrary files. • CVE-2007-5159: OS incorrectly installs a program with setuid privileges, allowing users to gain privileges. • CVE-2008-4638: Composite: application running with high privileges (CWE-250) allows user to specify a restricted file to process, which generates a parsing error that leaks the contents of the file (CWE-209). • CVE-2008-0162: Program does not drop privileges before calling another program, allowing code execution. • CVE-2008-0368: setuid root program allows creation of arbitrary files through command line argument. • CVE-2007-3931: Installation script installs some programs as setuid when they shouldn't be. • CVE-2020-3812: mail program runs as root but does not drop its privileges before attempting to access a file. Attacker can use a symlink from their home directory to a directory only readable by root, then determine whether the file exists based on the response. • CVE-2003-0908: Product launches Help functionality while running with raised privileges, allowing command execution using Windows message to access "open file" dialog.

Related

Attack pattern · CAPEC (3)

  • CAPEC-104 Cross Zone Scripting attack pattern
  • CAPEC-470 Expanding Control over the Operating System from the Database attack pattern
  • CAPEC-69 Target Programs with Elevated Privileges attack pattern

Observed example · CVE (9)

  • CVE-2020-3812 qmail-verify as used in netqmail 1.06 is prone to an information disclosure vulnerability. vulnerability
  • CVE-2008-4638 qioadmin in the Quick I/O for Database feature in Symantec Veritas File System (VxFS) on HP-UX, and before 5.0 MP3 on Solaris, Linux, and… vulnerability
  • CVE-2008-1877 tss 0.8.1 allows local users to read arbitrary files via the -a parameter, which is processed while tss is running with privileges. vulnerability
  • CVE-2008-0162 misc.c in splitvt 1.6.6 and earlier does not drop group privileges before executing xprop, which allows local users to gain privileges. vulnerability
  • CVE-2008-0368 onedcu in IBM Informix Dynamic Server (IDS) 10.x before 10.00.xC8 allows local users to create arbitrary files via the Trace file argument. vulnerability
  • CVE-2007-4217 Stack-based buffer overflow in the domacro function in ftp in IBM AIX 5.2 and 5.3 allows local users to gain privileges via a long… vulnerability
  • CVE-2007-5159 The ntfs-3g package before 1.913-2.fc7 in Fedora 7, and an ntfs-3g package in Ubuntu 7.10/Gutsy, assign incorrect permissions (setuid root)… vulnerability
  • CVE-2007-3931 The wrap_setuid_third_party_application function in the installation script for the Samsung SCX-4200 Driver 2.00.95 adds setuid permissions… vulnerability
  • CVE-2003-0908 The Utility Manager in Microsoft Windows 2000 executes winhlp32.exe with system privileges, which allows local users to execute arbitrary… vulnerability

Child of · CWE (2)

  • CWE-269 Improper Privilege Management weakness
  • CWE-657 Violation of Secure Design Principles weakness

Referenced by CAPEC · weakness (3)

  • CAPEC-104 Cross Zone Scripting attack pattern
  • CAPEC-470 Expanding Control over the Operating System from the Database attack pattern
  • CAPEC-69 Target Programs with Elevated Privileges attack pattern

Referenced by CVE · weakness (390)

  • CVE-2025-30046 In the CGM CLININET application server, multiple processes responsible for HL7 communication with external systems run with root privileges… vulnerability
  • CVE-2026-91335 Vulnerability in the Oracle Java SE, Oracle GraalVM for JDK, Oracle GraalVM Enterprise Edition product of Oracle Java SE (component: AWT). vulnerability
  • CVE-2026-104795 The insights-runtime-extractor runs as a privileged DaemonSet (`hostPID: true`) that scans container processes for runtime fingerprinting. vulnerability
  • CVE-2026-110150 Privilege elevation in Installer in Google Chrome on on Windows prior to 155.0.8059.79 allowed a local attacker to obtain sensitive… vulnerability
  • CVE-2026-65162 NVIDIA AIStore for Linux contains a vulnerability in the legacy ETL Kubernetes PodSpec initialization API where a remote attacker may… vulnerability
  • CVE-2026-87709 Improper access control in Windows Host Guardian Service allows an authorized attacker to perform tampering locally. vulnerability
  • CVE-2026-108820 A weakness has been identified in agno-agi agno up to 3.0.6/3.1.1. vulnerability
  • CVE-2026-75621 IBM Aspera Enterprise WebApps 1.0.0 through 1.0.6 could allow a local attacker to obtain sensitive information due to excessive permissions… vulnerability
  • CVE-2026-9209 mJobTime through build 15.7.3.32 contains an unauthenticated SQL execution vulnerability in the Login.aspx admin panel handlers, where the… vulnerability
  • CVE-2026-107176 A flaw was found in the cluster-samples-operator. vulnerability
  • CVE-2026-106378 Privilege elevation in Sandbox in Google Chrome on on Mac prior to 155.0.8059.39 allowed a remote attacker who had compromised the renderer… vulnerability
  • CVE-2026-66246 iControl is affected by a Broken Access Control vulnerability, which could allow an attacker to exploit missing authentication checks or… vulnerability
  • CVE-2026-102118 A local privilege escalation vulnerability in Kiteworks could have allowed an attacker with an existing shell under a low-privileged… vulnerability
  • CVE-2026-53605 Reachy Mini ISO for Wireless contains the necessary files to build a custom Raspberry Pi OS image for the Reachy Mini Wireless robot, using… vulnerability
  • CVE-2026-55094 Taskcluster is the task execution framework that supports Mozilla's continuous integration and release processes. vulnerability
  • CVE-2026-102247 A vulnerability was detected in FastAdmin 1.6.1.20250430/1.6.5.20260602. vulnerability
  • CVE-2026-88808 A vulnerability has been identified within Rancher Manager where the Fleet agent wrote resources to downstream clusters using its own… vulnerability
  • CVE-2026-19087 IBM Financial Transaction Manager (FTM) for RedHat OpenShift could allow a local attacker to achieve privilege escalation within the… vulnerability
  • CVE-2026-84787 ZohoCorp ManageEngine OpManager and Firewall Analyzer versions 12.8.710 and below were vulnerable to a Privilege Escalation vulnerability… vulnerability
  • CVE-2026-87899 Execution with unnecessary privileges in cPanel allows remote authenticated users to execute arbitrary code with root privileges. vulnerability
  • CVE-2026-77521 MaxKB is an open-source AI assistant for enterprise. vulnerability
  • CVE-2026-92574 A vulnerability in CRI-O checkpoint restore allows a user who can create a pod from a malicious checkpointed container to bypass the… vulnerability
  • CVE-2026-54501 Browsertrix is a high-fidelity, browser-based crawling service for web archiving that can be self-hosted or used through Webrecorder's… vulnerability
  • CVE-2026-55225 Strimzi provides a way to run an Apache Kafka cluster on Kubernetes or OpenShift in various deployment configurations. vulnerability
  • CVE-2026-75092 A privilege escalation flaw was found in the scan_mysql actor of leapp-upgrade-el9toel10 (provided by leapp-repository). vulnerability
  • CVE-2026-89259 Hugo is a static site generator. vulnerability
  • CVE-2026-79942 Dell SCG 5.0 Appliance versions prior to 5.36.00.16 and Dell SCG 5.0 Application versions prior to 5.36.00.00, contains an Execution with… vulnerability
  • CVE-2026-87506 Privilege elevation in WebUI in Google Chrome prior to 153.0.8010.36 allowed a remote attacker who had compromised the renderer process to… vulnerability
  • CVE-2026-69409 Execution with unnecessary privileges in Microsoft Office SharePoint allows an authorized attacker to disclose information over a network. vulnerability
  • CVE-2026-69464 Execution with unnecessary privileges in Microsoft Office SharePoint allows an authorized attacker to elevate privileges over a network. vulnerability
Show all 390 ›

Referenced by CWE · has member (1)