Base · Medium

CWE-280: Improper Handling of Insufficient Permissions or Privileges

The product does not handle or incorrectly handles when it has insufficient privileges to access resources or functionality as specified by their permissions. This may cause it to follow unexpected co...

CWE-280 · Base Level ·2 CVEs ·2 Mitigations

Description

The product does not handle or incorrectly handles when it has insufficient privileges to access resources or functionality as specified by their permissions. This may cause it to follow unexpected code paths that may leave the product in an invalid state.

Potential Impact

Other

Other, Alter Execution Logic

Mitigations & Prevention

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

Implementation

Always check to see if you have successfully accessed a resource or system functionality, and use proper error handling if it is unsuccessful. Do this even when you are operating in a highly privileged mode, because errors or environmental conditions might still cause a failure. For example, environments with highly granular permissions/privilege models, such as Windows or Linux capabilities, can cause unexpected failures.

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 sea

Real-World CVE Examples

CVE IDDescription
CVE-2003-0501Special file system allows attackers to prevent ownership/permission change of certain entries by opening the entries before calling a setuid program.
CVE-2004-0148FTP server places a user in the root directory when the user's permissions prevent access to the their own home directory.

Taxonomy Mappings

  • PLOVER: — Fails poorly due to insufficient permissions
  • WASC: 17 — Improper Filesystem Permissions
  • Software Fault Patterns: SFP4 — Unchecked Status Condition

Frequently Asked Questions

What is CWE-280?

CWE-280 (Improper Handling of Insufficient Permissions or Privileges) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Base-level weakness. The product does not handle or incorrectly handles when it has insufficient privileges to access resources or functionality as specified by their permissions. This may cause it to follow unexpected co...

How can CWE-280 be exploited?

Attackers can exploit CWE-280 (Improper Handling of Insufficient Permissions or Privileges) to other, alter execution logic. This weakness is typically introduced during the Implementation phase of software development.

How do I prevent CWE-280?

Key mitigations include: 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 interfaci

What is the severity of CWE-280?

CWE-280 is classified as a Base-level weakness (Medium abstraction). It has been observed in 2 real-world CVEs.