CWE-271: Privilege Dropping / Lowering Errors

What is CWE-271?

CWE-271 is Privilege Dropping / Lowering Errors. The flaw arises when the product does not drop privileges before passing control of a resource to an actor that does not have those privileges.

OWASP Top 10 Rank-
Related CVES (365 days)-
AbstractionClass
Likelihood of exploitHigh

No data

No vulnerability data for CWE-271

No data

No vulnerability data in CISA KEV for CWE-271

Official definition

ByMitre CWE

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

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.

Characteristics

Modes of introduction

  • Architecture and Design
  • Implementation: REALIZATION: This weakness is caused during implementation of an architectural security tactic.
  • Operation

Common consequences

ImpactScopeExplanation
Gain Privileges or Assume IdentityAccess ControlIf privileges are not dropped, neither are access rights of the user. Often these rights can be prevented from being dropped.
Gain Privileges or Assume Identity, Hide ActivitiesAccess Control, Non-RepudiationIf privileges are not dropped, in some cases the system may record actions as the user which is being impersonated rather than the impersonator.

Risk mitigations

  1. Separation of Privilege · Architecture and DesignCompartmentalize 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.
  2. Architecture and Design, OperationVery carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.
  3. Separation of Privilege · Architecture and DesignConsider following the principle of separation of privilege. Require multiple conditions to be met before permitting access to a system resource.

Detection methods

MethodApproachEffectiveness
Automated Static AnalysisAutomated 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.)-

Representative vulnerabilities

Sources (2)

CWE™ Program, operated by The MITRE Corporation. Copyright © 2006–2026, The MITRE Corporation. The MITRE Corporation hereby grants you a non-exclusive, royalty-free license to use CWE for research, development, and commercial purposes. CWE Terms of Use.

Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.