---
title: "CWE-271: Privilege Dropping / Lowering Errors"
url: https://radicalnotion.ai/cwe/cwe-271
type: cwe
description: "The product does not drop privileges before passing control of a resource to an actor that does not have those privileges."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-271: Privilege Dropping / Lowering Errors

- **Abstraction:** Class
- **Structure:** Simple
- **Status:** Incomplete
- **Likelihood of exploit:** High
- **CVEs with this as primary weakness:** 12
- **Of those, in CISA KEV:** 1
- **New in 2026:** 2
- **CWE catalog version:** 4.21

## Description

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

## Background

In some contexts, a system executing with elevated permissions will hand off a process/file/etc. to another process or user. If the privileges of an entity are not reduced, then elevated privileges are spread throughout a system and possibly to an attacker.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Architecture and Design | - |
| Implementation | REALIZATION: This weakness is caused during implementation of an architectural security tactic. |
| Operation | - |

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| 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 (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.

### Architecture and Design, Operation

Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.

### Architecture and Design (Separation of Privilege)

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

## Demonstrative examples

### Example 1

The following code calls chroot() to restrict the application to a subset of the filesystem below APP\_HOME in order to prevent an attacker from using the program to gain unauthorized access to files located elsewhere. The code then opens a file specified by the user and processes the contents of the file.

Bad code:

```c
chroot(APP_HOME);
chdir("/");
FILE* data = fopen(argv[1], "r+");
...
```

Constraining the process inside the application's home directory before opening any files is a valuable security measure. However, the absence of a call to setuid() with some non-zero value means the application is continuing to operate with unnecessary root privileges. Any successful exploit carried out by an attacker against the application can now result in a privilege escalation attack because any malicious operations will be performed with the privileges of the superuser. If the application drops to the privilege level of a non-root user, the potential for damage is substantially reduced.

## Observed examples

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

## Real CVEs with this weakness

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2019-13272 | Linux Kernel Improper Privilege Management Vulnerability | high | 7.3 | - | Yes | 2019-07-17 |
| CVE-2023-22648 | Rancher's Azure AD permission changes are not reflected on active sessions | high | 8.8 | - | No | 2023-06-01 |
| CVE-2019-11243 | Kubernetes did not effectively clear service account credentials | high | 8.1 | - | No | 2019-04-22 |
| CVE-2024-0985 | PostgreSQL non-owner REFRESH MATERIALIZED VIEW CONCURRENTLY executes arbitrary SQL | high | 8.0 | - | No | 2024-02-08 |
| CVE-2025-53819 | Nix's privilege dropping to build user broke for macOS | high | 7.9 | - | No | 2025-07-14 |
| 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 mailer, is not a fatal error and can lead to privilege escalation. | high | 7.8 | - | No | 2026-04-03 |
| CVE-2022-3569 | - | high | 7.8 | - | No | 2022-10-17 |
| CVE-2025-23395 | Local root exploit via \`logfile\_reopen()\` in screen 5.0.0 with setuid-root bit set | high | 7.3 | - | No | 2025-05-26 |
| CVE-2024-35179 | Unprivileged Stalwart Mail Server user can read files as root | medium | 6.8 | - | No | 2024-05-15 |
| CVE-2023-38496 | Apptainer's ineffective privileges drop when requesting container network | medium | 6.1 | - | No | 2023-07-25 |
| CVE-2026-25704 | Incomplete privilege drop for com.system76.CosmicGreeter.GetUserData | medium | 5.8 | - | No | 2026-03-30 |
| CVE-2020-35513 | kernel: Nfsd failure to clear umask after processing an open or create | medium | 4.9 | - | No | 2021-01-25 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-269](https://radicalnotion.ai/cwe/cwe-269) | Improper Privilege Management |
| Child | [CWE-272](https://radicalnotion.ai/cwe/cwe-272) | Least Privilege Violation |
| Child | [CWE-273](https://radicalnotion.ai/cwe/cwe-273) | Improper Check for Dropped Privileges |
| Peer | [CWE-274](https://radicalnotion.ai/cwe/cwe-274) | Improper Handling of Insufficient Privileges |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| PLOVER | Privilege Dropping / Lowering Errors | - | - |

## Frequently asked questions

### What is CWE-271?

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

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

12 recorded CVEs are attributed to CWE-271, including CVE-2019-13272, CVE-2023-22648 and CVE-2019-11243. 1 is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.

### How do you prevent CWE-271?

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-271 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-271?

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

### Is CWE-271 actively exploited?

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

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

---

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