CWE-272: Least Privilege Violation

What is CWE-272?

CWE-272 is Least Privilege Violation. The flaw arises when the elevated privilege level required to perform operations such as chroot() should be dropped immediately after the operation is performed. The database currently holds 23 vulnerabilities mapped to CWE-272 and none of them are in the CISA Known Exploited Vulnerabilities catalog.

OWASP Top 10 Rank-
Related CVES (365 days)23
AbstractionBase
Likelihood of exploit-

Vulnerabilities mapped to CWE-272

23 vulnerabilities475% increase year over year

No data

No vulnerability data in CISA KEV for CWE-272

Official definition

ByMitre CWE

The elevated privilege level required to perform operations such as chroot() should be dropped immediately after the operation is performed.

Characteristics

Modes of introduction

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

Common consequences

ImpactScopeExplanation
Gain Privileges or Assume Identity, Read Application Data, Read Files or DirectoriesAccess Control, ConfidentialityAn attacker may be able to access resources with the elevated privilege that could not be accessed with the attacker's original privileges. This is particularly likely in conjunction with another flaw, such as a buffer overflow.

Risk mitigations

  1. Architecture and Design, OperationVery carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.
  2. Separation of Privilege · Architecture and DesignFollow the principle of least privilege when assigning access rights to entities in a software system.
  3. 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.

Detection methods

MethodApproachEffectiveness
Automated Static Analysis - Binary or BytecodeAccording to SOAR [REF-1479], the following detection techniques may be useful: ``` Cost effective for partial coverage: ``` Compare binary / bytecode to application permission manifestSOAR Partial
Dynamic Analysis with Automated Results InterpretationAccording to SOAR [REF-1479], the following detection techniques may be useful: ``` Cost effective for partial coverage: ``` Host-based Vulnerability Scanners - Examine configuration for flaws, verifying that audit mechanisms work, ensure host configuration meets certain predefined criteriaSOAR Partial
Manual Static Analysis - Source CodeAccording to SOAR [REF-1479], the following detection techniques may be useful: ``` Highly cost effective: ``` Manual Source Code Review (not inspections) ``` Cost effective for partial coverage: ``` Focused Manual Spotcheck - Focused manual analysis of sourceHigh
Automated Static Analysis - Source CodeAccording to SOAR [REF-1479], the following detection techniques may be useful: ``` Cost effective for partial coverage: ``` Source code Weakness Analyzer Context-configured Source Code Weakness AnalyzerSOAR Partial
Automated Static AnalysisAccording to SOAR [REF-1479], the following detection techniques may be useful: ``` Cost effective for partial coverage: ``` Permission Manifest AnalysisSOAR Partial
Architecture or Design ReviewAccording to SOAR [REF-1479], the following detection techniques may be useful: ``` Highly cost effective: ``` Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.) Formal Methods / Correct-By-Construction ``` Cost effective for partial coverage: ``` Attack ModelingHigh
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.