CWEweakness

CWE-273 Improper Check for Dropped Privileges

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

Description

The product attempts to drop privileges but does not check or incorrectly checks to see if the drop succeeded.

Common consequences

• Access Control: Gain Privileges or Assume Identity — If the drop fails, the product will continue to run with the raised privileges, which might provide additional access to unprivileged users. 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. • [Implementation] Check the results of all functions that return a value and verify that the value is expected. • [Implementation] In Windows, make sure that the process token has the SeImpersonatePrivilege(Microsoft Server 2003). Code that relies on impersonation for security must ensure that the impersonation succeeded, i.e., that a proper privilege demotion happened.

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-2006-4447: Program does not check return value when invoking functions to drop privileges, which could leave users with higher privileges than expected by forcing those functions to fail. • CVE-2006-2916: Program does not check return value when invoking functions to drop privileges, which could leave users with higher privileges than expected by forcing those functions to fail.

Related

Observed example · CVE (2)

  • CVE-2006-4447 X.Org and XFree86, including libX11, xdm, xf86dga, xinit, xload, xtrans, and xterm, does not check the return values for setuid and seteuid… vulnerability
  • CVE-2006-2916 artswrapper in aRts, when running setuid root on Linux 2.6.0 or later versions, does not check the return value of the setuid function… vulnerability

Child of · CWE (2)

  • CWE-271 Privilege Dropping / Lowering Errors weakness
  • CWE-754 Improper Check for Unusual or Exceptional Conditions weakness

Peer of · CWE (1)

  • CWE-252 Unchecked Return Value weakness

Referenced by CVE · weakness (49)

  • CVE-2026-86385 Dell PowerProtect Data Domain, Feature Release versions 7.7.1.0 through 8.8, contain an Improper Check for Dropped Privileges vulnerability. vulnerability
  • CVE-2026-101304 When fdescfs(4) was mounted in a jail with the "nodup" option, opening /dev/fd/N returned a descriptor that did not inherit… vulnerability
  • CVE-2026-101305 renameat(2) did not enforce FD_RESOLVE_BENEATH on its directory arguments. vulnerability
  • CVE-2026-101306 SCM_RIGHTS file descriptor passing did not preserve FD_RESOLVE_BENEATH when a descriptor was transferred. vulnerability
  • CVE-2026-80047 A vulnerability in Hugging Face Transformers (versions 4.57.0 to 5.16.1) allows remote Python files to be written to local disk without… vulnerability
  • CVE-2026-58089 When a process calls execve(2) to execute a setuid or setgid image, hwpmc(4) is supposed to detach PMCs owned by unprivileged processes. vulnerability
  • CVE-2026-61897 An Ubuntu-specific patch to AccountsService before 23.13.9-8ubuntu7 only partially drops privileges before launching language helper… vulnerability
  • CVE-2026-49421 The kernel function that implements unlinkat(2) and funlinkat(2) validated the AT_RESOLVE_BENEATH flag but failed to pass it through to the… vulnerability
  • CVE-2026-58086 As an inadvertent side effect of an unrelated code change, PRIV_KTRACE was always denied to a jailed root user. vulnerability
  • CVE-2026-54552 sh provides Python process launching. vulnerability
  • CVE-2026-60085 PraisonAI before 4.6.78 contains an unenforced security policy vulnerability in the default Subprocess Sandbox backend where… vulnerability
  • CVE-2026-0099 In onNullBinding of HostEmulationManager.java, there is a possible way to launch an activity from the background due to a logic error in… vulnerability
  • CVE-2026-44073 Authentication modules in Netatalk 1.5.0 through 4.4.2 fail to check the return value of seteuid(), which may allow a remote authenticated… vulnerability
  • CVE-2026-32107 xrdp is an open source RDP server. vulnerability
  • CVE-2026-21882 theshit is a command-line utility that automatically detects and fixes common mistakes in shell commands. vulnerability
  • CVE-2025-62175 Mastodon is a free, open-source social network server based on ActivityPub. vulnerability
  • CVE-2025-27396 A vulnerability has been identified in SCALANCE LPE9403 (6GK5998-3GS00-2AC2) (All versions < V4.0). vulnerability
  • CVE-2025-1003 A potential vulnerability has been identified in HP Anyware Agent for Linux which might allow for authentication bypass which may result in… vulnerability
  • CVE-2023-0657 A flaw was found in Keycloak. vulnerability
  • CVE-2024-38813 The vCenter Server contains a privilege escalation vulnerability. vulnerability
  • CVE-2024-8382 Internal browser event interfaces were exposed to web content when privileged EventHandler listener callbacks ran for those events. vulnerability
  • CVE-2024-21848 Improper Access Control in Mattermost Server versions 8.1.x before 8.1.11 allows an attacker that is in a channel with an active call to… vulnerability
  • CVE-2024-25420 An issue in Ignite Realtime Openfire before 4.8.1 allows a remote attacker to escalate privileges via the admin.authorizedJIDs system… vulnerability
  • CVE-2021-47129 In the Linux kernel, the following vulnerability has been resolved: netfilter: nft_ct: skip expectations for confirmed conntrack… vulnerability
  • CVE-2023-52433 In the Linux kernel, the following vulnerability has been resolved: netfilter: nft_set_rbtree: skip sync GC for new elements in this… vulnerability
  • CVE-2023-34322 For migration as well as to work around kernels unaware of L1TF (see XSA-273), PV guests may be run in shadow paging mode. vulnerability
  • CVE-2023-26239 An issue was discovered in WatchGuard EPDR 8.0.21.0002. vulnerability
  • CVE-2023-5369 Before correction, the copy_file_range system call checked only for the CAP_READ and CAP_WRITE capabilities on the input and output file… vulnerability
  • CVE-2023-35692 In getLocationCache of GeoLocation.java, there is a possible way to send a mock location during an emergency call due to improper input… vulnerability
  • CVE-2023-21246 In ShortcutInfo of ShortcutInfo.java, there is a possible way for an app to retain notification listening access due to an uncaught… vulnerability
Show all 49 ›

Referenced by CWE · has member (1)