---
title: "CWE-273: Improper Check for Dropped Privileges"
url: https://radicalnotion.ai/cwe/cwe-273
type: cwe
description: "The product attempts to drop privileges but does not check or incorrectly checks to see if the drop succeeded."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-273: Improper Check for Dropped Privileges

- **Abstraction:** Base
- **Structure:** Simple
- **Status:** Incomplete
- **Likelihood of exploit:** Medium
- **CVEs with this as primary weakness:** 47
- **Of those, in CISA KEV:** 1
- **New in 2026:** 15
- **CWE catalog version:** 4.21

## Description

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

## Background

In Windows based environments that have access control, impersonation is used so that access checks can be performed on a client identity by a server with higher privileges. By impersonating the client, the server is restricted to client-level security -- although in different threads it may have much higher privileges.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | - |

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| 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 (Separation of Privilege)

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.

Effectiveness: High. Checking the return value of the function will typically be sufficient, however beware of race conditions (CWE-362) in a concurrent environment.

### 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.)

Effectiveness: High

## Demonstrative examples

### Example 1

This code attempts to take on the privileges of a user before creating a file, thus avoiding performing the action with unnecessarily high privileges:

Bad code:

```c++
bool DoSecureStuff(HANDLE hPipe) {
    bool fDataWritten = false;
    ImpersonateNamedPipeClient(hPipe);
    HANDLE hFile = CreateFile(...);
    /../
    RevertToSelf()
    /../
}
```

The call to ImpersonateNamedPipeClient may fail, but the return value is not checked. If the call fails, the code may execute with higher privileges than intended. In this case, an attacker could exploit this behavior to write a file to a location that the attacker does not have access to.

## Observed examples

| CVE | Description |
| --- | --- |
| 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. |

## Real CVEs with this weakness (sample of 12 of 47)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2024-38813 | Privilege escalation vulnerability | critical | 9.0 | - | Yes | 2024-09-17 |
| CVE-2015-0278 | libuv: incorrect revocation order while relinquishing privileges | critical | 10.0 | - | No | 2015-05-18 |
| CVE-2026-101306 | Multiple jail filesystem root escapes | critical | 9.8 | - | No | 2026-10-15 |
| CVE-2023-34844 | - | critical | 9.8 | - | No | 2023-06-29 |
| CVE-2021-36372 | Original block tokens are persisted and can be retrieved | critical | 9.8 | - | No | 2021-11-19 |
| CVE-2020-24361 | snmptt: allows attackers to execute shell code via EXEC, PREXEC, or unknown\_trap\_exec | critical | 9.8 | - | No | 2020-08-16 |
| CVE-2011-3350 | - | critical | 9.8 | - | No | 2019-11-19 |
| CVE-2011-2921 | - | critical | 9.8 | - | No | 2019-11-19 |
| CVE-2012-1187 | bitlbee: does not drop extra group privileges | critical | 9.8 | - | No | 2019-10-29 |
| CVE-2017-6972 | - | critical | 9.8 | - | No | 2017-03-22 |
| CVE-2026-86385 | - | high | 8.8 | - | No | 2026-10-28 |
| CVE-2026-101305 | Multiple jail filesystem root escapes | high | 8.8 | - | No | 2026-10-15 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-271](https://radicalnotion.ai/cwe/cwe-271) | Privilege Dropping / Lowering Errors |
| Parent | [CWE-754](https://radicalnotion.ai/cwe/cwe-754) | Improper Check for Unusual or Exceptional Conditions |
| Peer | [CWE-252](https://radicalnotion.ai/cwe/cwe-252) | Unchecked Return Value |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| CLASP | Failure to check whether privileges were dropped successfully | - | - |
| CERT C Secure Coding | Ensure that privilege relinquishment is successful | POS37-C | Exact |
| Software Fault Patterns | Unchecked Status Condition | SFP4 | - |

## Frequently asked questions

### What is CWE-273?

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

### What CVEs are caused by CWE-273?

47 recorded CVEs are attributed to CWE-273, including CVE-2024-38813, CVE-2015-0278 and CVE-2026-101306. 1 is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.

### How do you prevent CWE-273?

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.

### How is CWE-273 detected?

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.)

### What are the consequences of CWE-273?

Exploiting CWE-273 can lead to: Gain Privileges or Assume Identity, Hide Activities.

### Is CWE-273 actively exploited?

Yes. 1 CWE-273 vulnerability is in CISA's KEV catalog of actively exploited flaws, out of 47 recorded CVEs.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/273.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-273). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
