CWEweakness

CWE-271 Privilege Dropping / Lowering Errors

High Official page ↗
Abstraction
Class
Structure
Simple
Status
Incomplete
Likelihood of exploit
High
Languages
Not Language-Specific
CWE version
5.0

Description

The product does not drop privileges before passing control of a resource to an actor that does not have those privileges.

Common consequences

• Access Control: Gain Privileges or Assume Identity — If privileges are not dropped, neither are access rights of the user. Often these rights can be prevented from being dropped. • Access Control, Non-Repudiation: Gain Privileges or Assume Identity, Hide Activities — If privileges are not dropped, in some cases the system may record actions as the user which is being impersonated rather than the impersonator.

Potential mitigations

• [Architecture and Design] Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges. • [Architecture and Design, Operation] Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software. • [Architecture and Design] Consider following the principle of separation of privilege. Require multiple conditions to be met before permitting access to a system resource.

Detection methods

• Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Observed examples

• CVE-2000-1213: Program does not drop privileges after acquiring the raw socket. • CVE-2001-0559: Setuid program does not drop privileges after a parsing error occurs, then calls another program to handle the error. • CVE-2001-0787: Does not drop privileges in related groups when lowering privileges. • CVE-2002-0080: Does not drop privileges in related groups when lowering privileges. • CVE-2001-1029: Does not drop privileges before determining access to certain files. • CVE-1999-0813: Finger daemon does not drop privileges when executing programs on behalf of the user being fingered. • CVE-1999-1326: FTP server does not drop privileges if a connection is aborted during file transfer. • CVE-2000-0172: Program only uses seteuid to drop privileges. • CVE-2004-2504: Windows program running as SYSTEM does not drop privileges before executing other programs (many others like this, especially involving the Help facility). • CVE-2004-0213: Utility Manager launches winhlp32.exe while running with raised privileges, which allows local users to gain system privileges. • CVE-2004-0806: Setuid program does not drop privileges before executing program specified in an environment variable. • CVE-2004-0828: Setuid program does not drop privileges before processing file specified on command line. • CVE-2004-2070: Service on Windows does not drop privileges before using "view file" option, allowing code execution.

Related

Observed example · CVE (13)

  • CVE-2004-0806 cdrecord in the cdrtools package before 2.01, when installed setuid root, does not properly drop privileges before executing a program… vulnerability
  • CVE-2004-2070 The Altiris Client Service for Windows 5.6 SP1 Hotfix E (5.6.181) allows local users to execute arbitrary commands by opening the AClient… vulnerability
  • CVE-2004-2504 The GUI in Alt-N Technologies MDaemon 7.2 and earlier, including 6.8, executes child processes such as NOTEPAD.EXE with SYSTEM privileges… vulnerability
  • CVE-2004-0828 The ctstrtcasd program in RSCT 2.3.0.0 and earlier on IBM AIX 5.2 and 5.3 does not properly drop privileges before executing the -f option,… vulnerability
  • CVE-2004-0213 Utility Manager in Windows 2000 launches winhlp32.exe while Utility Manager is running with raised privileges, which allows local users to… vulnerability
  • CVE-2002-0080 rsync, when running in daemon mode, does not properly call setgroups before dropping privileges, which could provide supplemental group… vulnerability
  • CVE-2001-0787 LPRng in Red Hat Linux 7.0 and 7.1 does not properly drop memberships in supplemental groups when lowering privileges, which could allow a… vulnerability
  • CVE-2001-1029 libutil in OpenSSH on FreeBSD 4.4 and earlier does not drop privileges before verifying the capabilities for reading the copyright and… vulnerability
  • CVE-2001-0559 crontab in Vixie cron 3.0.1 and earlier does not properly drop privileges after the failed parsing of a modification operation, which could… vulnerability
  • CVE-2000-1213 ping in iputils before 20001010, as distributed on Red Hat Linux 6.2 through 7J and other operating systems, does not drop privileges after… vulnerability
  • CVE-2000-0172 The mtr program only uses a seteuid call when attempting to drop privileges, which could allow local users to gain root privileges. vulnerability
  • CVE-1999-0813 Cfingerd with ALLOW_EXECUTION enabled does not properly drop privileges when it executes a program on behalf of the user, allowing local… vulnerability
  • CVE-1999-1326 wu-ftpd 2.4 FTP server does not properly drop privileges when an ABOR (abort file transfer) command is executed during a file transfer,… vulnerability

Child of · CWE (1)

  • CWE-269 Improper Privilege Management weakness

Referenced by CVE · weakness (12)

  • CVE-2026-44477 CloudNativePG is a platform designed to manage PostgreSQL databases within Kubernetes environments. vulnerability
  • CVE-2026-35535 In Sudo through 1.9.17p2 before 3e474c2, a failure of a setuid, setgid, or setgroups call, during a privilege drop before running the… vulnerability
  • CVE-2026-25704 A Privilege Dropping / Lowering Errors/Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability in cosmic-greeter can allow an… vulnerability
  • CVE-2025-53819 Nix is a package manager for Linux and other Unix systems. vulnerability
  • CVE-2025-23395 Screen 5.0.0 when it runs with setuid-root privileges does not drop privileges while operating on a user supplied path. vulnerability
  • CVE-2024-35179 Stalwart Mail Server is an open-source mail server. vulnerability
  • CVE-2024-0985 Late privilege drop in REFRESH MATERIALIZED VIEW CONCURRENTLY in PostgreSQL allows an object creator to execute arbitrary SQL functions as… vulnerability
  • CVE-2023-38496 Apptainer is an open source container platform. vulnerability
  • CVE-2023-22648 A Improper Privilege Management vulnerability in SUSE Rancher causes permission changes in Azure AD not to be reflected to users while they… vulnerability
  • CVE-2022-3569 Due to an issue with incorrect sudo permissions, Zimbra Collaboration Suite (ZCS) suffers from a local privilege escalation issue in… vulnerability
  • CVE-2020-35513 A flaw incorrect umask during file or directory modification in the Linux kernel NFS (network file system) functionality was found in the… vulnerability
  • CVE-2019-11243 In Kubernetes v1.12.0-v1.12.4 and v1.13.0, the rest.AnonymousClientConfig() method returns a copy of the provided config, with credentials… vulnerability

Referenced by CWE · child of (2)

  • CWE-272 Least Privilege Violation weakness
  • CWE-273 Improper Check for Dropped Privileges weakness

Referenced by CWE · has member (1)

Referenced by CWE · peer of (1)

  • CWE-274 Improper Handling of Insufficient Privileges weakness